diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-31 05:15:43 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-31 05:15:43 +0000 |
commit | 2771b1c10df9718860f95e8674914d9e0b490a06 (patch) | |
tree | b4716dd235d9b9ed6e5d7ef5ebc7228d54a67125 /ui/gfx/interpolated_transform_unittest.cc | |
parent | a692d1340352d1ed6a8612fe2ad125be300c278a (diff) | |
download | chromium_src-2771b1c10df9718860f95e8674914d9e0b490a06.zip chromium_src-2771b1c10df9718860f95e8674914d9e0b490a06.tar.gz chromium_src-2771b1c10df9718860f95e8674914d9e0b490a06.tar.bz2 |
ui: Remove implicit flooring from Point3f and rename the class to Point3F
The Point3F::AsPoint() method converts from float to integer by doing an
implicit floor() on the values. Instead, we should have AsPointF() return
floating point values, and use the ToFlooredPoint() conversion method to
explicitly floor the values at the call-site if desired.
Also, move the point3.h header to point3_f.h so that it is consistent with
other geometry header file namings.
BUG=147395
R=sky
Review URL: https://chromiumcodereview.appspot.com/11301043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/interpolated_transform_unittest.cc')
-rw-r--r-- | ui/gfx/interpolated_transform_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/gfx/interpolated_transform_unittest.cc b/ui/gfx/interpolated_transform_unittest.cc index 5beac94..65c5e2c 100644 --- a/ui/gfx/interpolated_transform_unittest.cc +++ b/ui/gfx/interpolated_transform_unittest.cc @@ -47,10 +47,10 @@ TEST(InterpolatedTransformTest, InterpolatedRotation) { } TEST(InterpolatedTransformTest, InterpolatedScale) { - ui::InterpolatedScale interpolated_scale(gfx::Point3f(0, 0, 0), - gfx::Point3f(100, 100, 100)); + ui::InterpolatedScale interpolated_scale(gfx::Point3F(0, 0, 0), + gfx::Point3F(100, 100, 100)); ui::InterpolatedScale interpolated_scale_diff_start_end( - gfx::Point3f(0, 0, 0), gfx::Point3f(100, 100, 100), 100, 200); + gfx::Point3F(0, 0, 0), gfx::Point3F(100, 100, 100), 100, 200); for (int i = 0; i <= 100; ++i) { gfx::Transform scale; @@ -102,7 +102,7 @@ TEST(InterpolatedTransformTest, InterpolatedScaleAboutPivot) { gfx::Point above_pivot(100, 200); ui::InterpolatedTransformAboutPivot interpolated_xform( pivot, - new ui::InterpolatedScale(gfx::Point3f(1, 1, 1), gfx::Point3f(2, 2, 2))); + new ui::InterpolatedScale(gfx::Point3F(1, 1, 1), gfx::Point3F(2, 2, 2))); gfx::Transform result = interpolated_xform.Interpolate(0.0f); CheckApproximatelyEqual(gfx::Transform(), result); result = interpolated_xform.Interpolate(1.0f); @@ -125,7 +125,7 @@ TEST(InterpolatedTransformTest, FactorTRS) { // factor the matrix gfx::Point translation; float rotation; - gfx::Point3f scale; + gfx::Point3F scale; bool success = ui::InterpolatedTransform::FactorTRS(transform, &translation, &rotation, @@ -219,8 +219,8 @@ ui::InterpolatedTransform* GetMaximize() { target_bounds.width()) / initial_bounds.height(); scoped_ptr<ui::InterpolatedTransform> scale( - new ui::InterpolatedScale(gfx::Point3f(1, 1, 1), - gfx::Point3f(scale_x, scale_y, 1))); + new ui::InterpolatedScale(gfx::Point3F(1, 1, 1), + gfx::Point3F(scale_x, scale_y, 1))); scoped_ptr<ui::InterpolatedTransform> translation( new ui::InterpolatedTranslation( |