diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 17:15:38 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 17:15:38 +0000 |
commit | 7852a5066d2b6c1d552cb40cd918a39b1eee4de0 (patch) | |
tree | 62956fb9cbef939657a49c709ccfdc3877e1926b /cc/base/math_util.h | |
parent | 9c01c3700505881089954e65a3fed60d1b85b5fd (diff) | |
download | chromium_src-7852a5066d2b6c1d552cb40cd918a39b1eee4de0.zip chromium_src-7852a5066d2b6c1d552cb40cd918a39b1eee4de0.tar.gz chromium_src-7852a5066d2b6c1d552cb40cd918a39b1eee4de0.tar.bz2 |
Revert 224725 "Fix compilation and ui_unittests with float trans..."
Reverting as caused perf regression because of new static
initializers.
> 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
>
> Review URL: https://chromiumcodereview.appspot.com/23811009
TBR=enne@chromium.org
Review URL: https://codereview.chromium.org/23537065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/base/math_util.h')
-rw-r--r-- | cc/base/math_util.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/base/math_util.h b/cc/base/math_util.h index 67a9370..7912f8a 100644 --- a/cc/base/math_util.h +++ b/cc/base/math_util.h @@ -39,24 +39,24 @@ struct HomogeneousCoordinate { bool ShouldBeClipped() const { return w() <= 0.0; } gfx::PointF CartesianPoint2d() const { - if (w() == SK_MScalar1) + if (w() == 1.0) return gfx::PointF(x(), y()); // For now, because this code is used privately only by MathUtil, it should // never be called when w == 0, and we do not yet need to handle that case. DCHECK(w()); - SkMScalar inv_w = SK_MScalar1 / w(); + SkMScalar inv_w = 1.0 / w(); return gfx::PointF(x() * inv_w, y() * inv_w); } gfx::Point3F CartesianPoint3d() const { - if (w() == SK_MScalar1) + if (w() == 1) return gfx::Point3F(x(), y(), z()); // For now, because this code is used privately only by MathUtil, it should // never be called when w == 0, and we do not yet need to handle that case. DCHECK(w()); - SkMScalar inv_w = SK_MScalar1 / w(); + SkMScalar inv_w = 1.0 / w(); return gfx::Point3F(x() * inv_w, y() * inv_w, z() * inv_w); } |