Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_mac.mm ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 0452e855e57f948a43de77a8b90572e671ad27a5..aa9b264f7ab3a5e21c0185e1467b65ac315cb521 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1065,11 +1065,14 @@ bool PluginInstance::GetBitmapForOptimizedPluginPaint(
gfx::Rect pixel_plugin_backing_store_rect(
0, 0, image_data->width(), image_data->height());
float scale = GetBoundGraphics2D()->GetScale();
+ gfx::RectF scaled_backing_store_rect = pixel_plugin_backing_store_rect;
+ scaled_backing_store_rect.Scale(scale);
gfx::Rect plugin_backing_store_rect =
- gfx::ToEnclosedRect(pixel_plugin_backing_store_rect.Scale(scale));
+ gfx::ToEnclosedRect(scaled_backing_store_rect);
gfx::Rect clip_page = PP_ToGfxRect(view_data_.clip_rect);
- gfx::Rect plugin_paint_rect = plugin_backing_store_rect.Intersect(clip_page);
+ gfx::Rect plugin_paint_rect = plugin_backing_store_rect;
+ plugin_paint_rect.Intersect(clip_page);
if (!plugin_paint_rect.Contains(relative_paint_bounds))
return false;
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_mac.mm ('k') | webkit/plugins/ppapi/ppb_graphics_2d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698