summaryrefslogtreecommitdiffstats
path: root/webkit/compositor_bindings
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 04:59:34 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 04:59:34 +0000
commit114e65d34c6f1a38bc447d70840e8ac2b30b953b (patch)
treeb810d0d9b81098d8cc8e720528fd01cd6bed8ade /webkit/compositor_bindings
parent84b8bd1002a2a50e22fbc57fca169ebcbba35928 (diff)
downloadchromium_src-114e65d34c6f1a38bc447d70840e8ac2b30b953b.zip
chromium_src-114e65d34c6f1a38bc447d70840e8ac2b30b953b.tar.gz
chromium_src-114e65d34c6f1a38bc447d70840e8ac2b30b953b.tar.bz2
cc: Replace the WebCore::UnitBezier class with the SkUnitCubicInterp() method from Skia.
This method exists in Skia, but is not publicly consumable/linkable with a component build. Skia will expose this (or a similar) method through a proper public API, and we should use it. But in the meantime, we make a copy of the method in timing_function.cc, and use it there in place of WebCore's UnitBezier class. Tests: cc_unittests:TimingFunctionTest.CubicBezierTimingFunction This test compares the output of the timing function against baseline values recorded with WebCore's UnitBezier class. If new methods are able to come closer to those values, we should decrease the epsilon used in the test accordingly. R=jamesr BUG=147395 Review URL: https://chromiumcodereview.appspot.com/11359077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/compositor_bindings')
-rw-r--r--webkit/compositor_bindings/web_float_animation_curve_unittest.cc2
-rw-r--r--webkit/compositor_bindings/web_transform_animation_curve_unittest.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/webkit/compositor_bindings/web_float_animation_curve_unittest.cc b/webkit/compositor_bindings/web_float_animation_curve_unittest.cc
index 449a892..ee1b74e 100644
--- a/webkit/compositor_bindings/web_float_animation_curve_unittest.cc
+++ b/webkit/compositor_bindings/web_float_animation_curve_unittest.cc
@@ -103,7 +103,7 @@ TEST(WebFloatAnimationCurveTest, CubicBezierTimingFunction)
EXPECT_FLOAT_EQ(0, curve->getValue(0));
EXPECT_LT(0, curve->getValue(0.25));
EXPECT_GT(0.25, curve->getValue(0.25));
- EXPECT_FLOAT_EQ(0.5, curve->getValue(0.5));
+ EXPECT_NEAR(curve->getValue(0.5), 0.5, 0.00015);
EXPECT_LT(0.75, curve->getValue(0.75));
EXPECT_GT(1, curve->getValue(0.75));
EXPECT_FLOAT_EQ(1, curve->getValue(1));
diff --git a/webkit/compositor_bindings/web_transform_animation_curve_unittest.cc b/webkit/compositor_bindings/web_transform_animation_curve_unittest.cc
index 2ca4e48..db9e467 100644
--- a/webkit/compositor_bindings/web_transform_animation_curve_unittest.cc
+++ b/webkit/compositor_bindings/web_transform_animation_curve_unittest.cc
@@ -136,7 +136,7 @@ TEST(WebTransformAnimationCurveTest, CubicBezierTimingFunction)
EXPECT_FLOAT_EQ(0, curve->getValue(0).m41());
EXPECT_LT(0, curve->getValue(0.25).m41());
EXPECT_GT(0.25, curve->getValue(0.25).m41());
- EXPECT_FLOAT_EQ(0.5, curve->getValue(0.5).m41());
+ EXPECT_NEAR(curve->getValue(0.5).m41(), 0.5, 0.00015);
EXPECT_LT(0.75, curve->getValue(0.75).m41());
EXPECT_GT(1, curve->getValue(0.75).m41());
EXPECT_FLOAT_EQ(1, curve->getValue(1).m41());