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

Unified Diff: content/renderer/webplugin_delegate_proxy.cc

Issue 10855227: Merge 152061 - linux/npapi: correctly clip damage rect when checking if the background has changed. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webplugin_delegate_proxy.cc
===================================================================
--- content/renderer/webplugin_delegate_proxy.cc (revision 152111)
+++ content/renderer/webplugin_delegate_proxy.cc (working copy)
@@ -845,10 +845,11 @@
DCHECK_EQ(cairo_image_surface_get_format(page_surface), CAIRO_FORMAT_ARGB32);
// Transform context coordinates into surface coordinates.
- double page_x_double = rect.x();
- double page_y_double = rect.y();
- cairo_user_to_device(context, &page_x_double, &page_y_double);
- gfx::Rect full_content_rect(0, 0,
+ double page_x_double = 0;
+ double page_y_double = 0;
+ cairo_device_to_user(context, &page_x_double, &page_y_double);
+ gfx::Rect full_content_rect(static_cast<int>(page_x_double),
+ static_cast<int>(page_y_double),
cairo_image_surface_get_width(page_surface),
cairo_image_surface_get_height(page_surface));
#endif
@@ -881,8 +882,8 @@
cairo_surface_flush(page_surface);
const unsigned char* page_bytes = cairo_image_surface_get_data(page_surface);
int page_stride = cairo_image_surface_get_stride(page_surface);
- int page_start_x = static_cast<int>(page_x_double);
- int page_start_y = static_cast<int>(page_y_double);
+ int page_start_x = content_rect.x() - static_cast<int>(page_x_double);
+ int page_start_y = content_rect.y() - static_cast<int>(page_y_double);
skia::ScopedPlatformPaint scoped_platform_paint(
background_store_.canvas.get());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698