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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 6261019: Make a hole only as big as is necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Paint hole early, and sanitize invalid_rect_ 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/browser/renderer_host/render_widget_host_view_views.cc
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index c6be0b356c3060936e84e04db8411458451fd6e6..9d6bcc99dd201c26bb115d74fd53b25fca9097b5 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -282,6 +282,7 @@ void RenderWidgetHostViewViews::DidUpdateBackingStore(
else
SchedulePaint(rect, false);
}
+ invalid_rect_ = invalid_rect_.Intersect(bounds());
sadrul 2011/01/21 16:36:19 We need to either sanitize invalid_rect_ here, or
}
void RenderWidgetHostViewViews::RenderViewGone(base::TerminationStatus status,
@@ -358,7 +359,8 @@ void RenderWidgetHostViewViews::Paint(gfx::Canvas* canvas) {
// Paint a "hole" in the canvas so that the render of the web page is on
// top of whatever else has already been painted in the views hierarchy.
// Later views might still get to paint on top.
- canvas->FillRectInt(SK_ColorBLACK, 0, 0, kMaxWindowWidth, kMaxWindowHeight,
+ canvas->FillRectInt(SK_ColorBLACK, 0, 0,
+ bounds().width(), bounds().height(),
SkXfermode::kClear_Mode);
// Don't do any painting if the GPU process is rendering directly
« 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