diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-10 09:34:28 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-10 09:34:28 +0000 |
commit | 01a15a710b6ffb772bdf8e3827e9f1395d29d814 (patch) | |
tree | e0bf4c1332ac22b7cc939be4b08f2bdafa732a9c /webkit/plugins/ppapi/ppb_graphics_2d_impl.cc | |
parent | bcf7636d116fe67fd79d9acca753b1b18f380654 (diff) | |
download | chromium_src-01a15a710b6ffb772bdf8e3827e9f1395d29d814.zip chromium_src-01a15a710b6ffb772bdf8e3827e9f1395d29d814.tar.gz chromium_src-01a15a710b6ffb772bdf8e3827e9f1395d29d814.tar.bz2 |
ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point.
Covered by existing unit tests.
R=sky
BUG=160158
Review URL: https://chromiumcodereview.appspot.com/11377068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167077 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.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc index 0c0e30b..3de90b6 100644 --- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc +++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc @@ -563,7 +563,8 @@ void PPB_Graphics2D_Impl::Paint(WebKit::WebCanvas* canvas, SkAutoCanvasRestore auto_restore(canvas, true); canvas->clipRect(sk_invalidate_rect); gfx::Size pixel_image_size(image_data_->width(), image_data_->height()); - gfx::Size image_size = gfx::ToFlooredSize(pixel_image_size.Scale(scale_)); + gfx::Size image_size = gfx::ToFlooredSize( + gfx::ScaleSize(pixel_image_size, scale_)); PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); if (!plugin_instance) |