summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 21:44:13 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-09 21:44:13 +0000
commitfaf56350461211be7de324e5514e8c8119b2047f (patch)
treecf32ca3885dba45c4be7b7415c24a534cd1f7948 /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
parentb9f4fe57863be1acc88ebe779f9f91bce0e1aeff (diff)
downloadchromium_src-faf56350461211be7de324e5514e8c8119b2047f.zip
chromium_src-faf56350461211be7de324e5514e8c8119b2047f.tar.gz
chromium_src-faf56350461211be7de324e5514e8c8119b2047f.tar.bz2
ui: Make gfx::Point::Scale() mutate the class, similar to gfx::Rect.
We add gfx::ScalePoint() as a non-mutating version of the Scale method. Tests: ui_unittests:PointTest.Scale R=sky BUG=160158 Review URL: https://codereview.chromium.org/11369144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166979 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_graphics_2d_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_2d_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
index e6831a7..0c0e30b 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
@@ -649,14 +649,14 @@ bool PPB_Graphics2D_Impl::ConvertToLogicalPixels(float scale,
if (delta) {
gfx::Point original_delta = *delta;
float inverse_scale = 1.0f / scale;
- *delta = gfx::ToFlooredPoint(delta->Scale(scale));
+ *delta = gfx::ToFlooredPoint(gfx::ScalePoint(*delta, scale));
gfx::Rect inverse_scaled_rect =
gfx::ToEnclosingRect(gfx::ScaleRect(*op_rect, inverse_scale));
if (original_rect != inverse_scaled_rect)
return false;
gfx::Point inverse_scaled_point =
- gfx::ToFlooredPoint(delta->Scale(inverse_scale));
+ gfx::ToFlooredPoint(gfx::ScalePoint(*delta, inverse_scale));
if (original_delta != inverse_scaled_point)
return false;
}