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

Unified Diff: chrome/plugin/webplugin_proxy.cc

Issue 372078: Fix partial updates of transparent plugin backgrounds on Mac (Closed)
Patch Set: Created 11 years, 1 month 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 | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/webplugin_proxy.cc
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index ab5326fd1977c2151055d8fd3d2c608098905bd6..9983315e8c39f16e7c938358bbf4012b2393e92c 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -422,8 +422,11 @@ void WebPluginProxy::Paint(const gfx::Rect& rect) {
} else {
scoped_cftyperef<CGImageRef> image(
CGBitmapContextCreateImage(background_context_));
+ CGRect source_rect = rect.ToCGRect();
+ // Flip the rect we use to pull from the canvas, since it's upside-down.
+ source_rect.origin.y = CGImageGetHeight(image) - rect.y() - rect.height();
scoped_cftyperef<CGImageRef> sub_image(
- CGImageCreateWithImageInRect(image, rect.ToCGRect()));
+ CGImageCreateWithImageInRect(image, source_rect));
CGContextDrawImage(windowless_context_, rect.ToCGRect(), sub_image);
}
CGContextClipToRect(windowless_context_, rect.ToCGRect());
« no previous file with comments | « no previous file | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698