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

Unified Diff: chrome/renderer/render_widget.cc

Issue 6296010: Don't unnecessarily paint pixles when doing optimized always-on-top pepper pa... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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: chrome/renderer/render_widget.cc
===================================================================
--- chrome/renderer/render_widget.cc (revision 71513)
+++ chrome/renderer/render_widget.cc (working copy)
@@ -441,7 +441,7 @@
// the plugin. Unlike the DoDeferredUpdate case, an extra copy is still
// required.
optimized_instance->Paint(webkit_glue::ToWebCanvas(canvas),
- optimized_copy_location, optimized_copy_location);
+ optimized_copy_location, rect);
} else {
// Normal painting case.
webwidget_->paint(webkit_glue::ToWebCanvas(canvas), rect);
@@ -530,6 +530,8 @@
!is_accelerated_compositing_active_ &&
GetBitmapForOptimizedPluginPaint(bounds, &dib, &optimized_copy_location,
&optimized_copy_rect)) {
+ // Only update the part of the plugin that actually changed.
+ optimized_copy_rect = optimized_copy_rect.Intersect(bounds);
bounds = optimized_copy_location;
copy_rects.push_back(optimized_copy_rect);
dib_id = dib->id();
« 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