| Index: third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| diff --git a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| index 1cb3bca95d544fd2822e1f629b1884da0badcefd..a491e924d9baa25ce3379b7b593801054fdc9987 100644
|
| --- a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| +++ b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| @@ -38,6 +38,9 @@
|
| #include "wtf/Assertions.h"
|
| #include "wtf/MathExtras.h"
|
|
|
| +#include <cmath>
|
| +#include <cstdlib>
|
| +
|
| #if CPU(X86_64)
|
| #include <emmintrin.h>
|
| #endif
|
| @@ -597,8 +600,7 @@ static void slerp(double qa[4], const double qb[4], double t)
|
|
|
| product = ax * bx + ay * by + az * bz + aw * bw;
|
|
|
| - // Clamp product to -1.0 <= product <= 1.0.
|
| - product = std::min(std::max(product, -1.0), 1.0);
|
| + product = clampTo(product, -1.0, 1.0);
|
|
|
| const double epsilon = 1e-5;
|
| if (std::abs(product - 1.0) < epsilon) {
|
| @@ -711,7 +713,7 @@ FloatQuad TransformationMatrix::projectQuad(const FloatQuad& q, bool* clamped) c
|
| static float clampEdgeValue(float f)
|
| {
|
| ASSERT(!std::isnan(f));
|
| - return std::min<float>(std::max<float>(f, (-LayoutUnit::max() / 2).toFloat()), (LayoutUnit::max() / 2).toFloat());
|
| + return clampTo(f, (-LayoutUnit::max() / 2).toFloat(), (LayoutUnit::max() / 2).toFloat());
|
| }
|
|
|
| LayoutRect TransformationMatrix::clampedBoundsOfProjectedQuad(const FloatQuad& q) const
|
|
|