diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 03:25:05 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 03:25:05 +0000 |
commit | 6138db702aa3c08703b2952b5aaa1ba7533a3813 (patch) | |
tree | 003d2b10f8a20ef82911b63d060084997ef958a7 /cc/animation | |
parent | 63f8b5a1835d589ba335006749b04d1aa2340bd7 (diff) | |
download | chromium_src-6138db702aa3c08703b2952b5aaa1ba7533a3813.zip chromium_src-6138db702aa3c08703b2952b5aaa1ba7533a3813.tar.gz chromium_src-6138db702aa3c08703b2952b5aaa1ba7533a3813.tar.bz2 |
Fix compilation and ui_unittests with float transforms
This change also cleans up the use of gfx::Transform::get/setDouble
(in favor of get/set) at callsites to prepare for changing SkMScalar
from double to float.
BUG=269817
Originally Committed/Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=224725
Review URL: https://chromiumcodereview.appspot.com/23811009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/animation')
-rw-r--r-- | cc/animation/keyframed_animation_curve_unittest.cc | 8 | ||||
-rw-r--r-- | cc/animation/transform_operation.cc | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc index 48f511c0..7eb3b1c 100644 --- a/cc/animation/keyframed_animation_curve_unittest.cc +++ b/cc/animation/keyframed_animation_curve_unittest.cc @@ -12,8 +12,8 @@ namespace cc { namespace { -void ExpectTranslateX(double translate_x, const gfx::Transform& transform) { - EXPECT_FLOAT_EQ(translate_x, transform.matrix().getDouble(0, 3)); +void ExpectTranslateX(SkMScalar translate_x, const gfx::Transform& transform) { + EXPECT_FLOAT_EQ(translate_x, transform.matrix().get(0, 3)); } void ExpectBrightness(double brightness, const FilterOperations& filter) { @@ -185,8 +185,8 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes) { // There is a discontinuity at 1. Any value between 4 and 6 is valid. gfx::Transform value = curve->GetValue(1.f); - EXPECT_GE(value.matrix().getDouble(0.f, 3.f), 4); - EXPECT_LE(value.matrix().getDouble(0.f, 3.f), 6); + EXPECT_GE(value.matrix().get(0, 3), 4.f); + EXPECT_LE(value.matrix().get(0, 3), 6.f); ExpectTranslateX(6.f, curve->GetValue(1.5f)); ExpectTranslateX(6.f, curve->GetValue(2.f)); diff --git a/cc/animation/transform_operation.cc b/cc/animation/transform_operation.cc index 93f40f3..a06b533 100644 --- a/cc/animation/transform_operation.cc +++ b/cc/animation/transform_operation.cc @@ -12,7 +12,7 @@ #include "ui/gfx/vector3d_f.h" namespace { -const SkMScalar kAngleEpsilon = 1e-4; +const SkMScalar kAngleEpsilon = 1e-4f; } namespace cc { |