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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view.h

Issue 66013: Fix problems correctly invalidating/repainting when our updated paint rect fo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
Index: chrome/browser/renderer_host/render_widget_host_view.h
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view.h (revision 13668)
+++ chrome/browser/renderer_host/render_widget_host_view.h (working copy)
@@ -91,8 +91,19 @@
virtual void IMEUpdateStatus(int control, const gfx::Rect& caret_rect) = 0;
// Informs the view that a portion of the widget's backing store was painted.
- // The view should copy the given rect from the backing store of the render
- // widget onto the screen.
+ // The view should ensure this gets copied to the screen.
+ //
+ // There are subtle performance implications here. The RenderWidget gets sent
+ // a paint ack after this returns, so if the view only ever invalidates in
+ // response to this, then on Windows, where WM_PAINT has lower priority than
+ // events which can cause renderer resizes/paint rect updates, e.g.
+ // drag-resizing can starve painting; this function thus provides the view its
+ // main chance to ensure it stays painted and not just invalidated. On the
+ // other hand, if this always blindly paints, then if we're already in the
+ // midst of a paint on the callstack, we can double-paint unnecessarily.
+ // (Worse, we might recursively call RenderWidgetHost::GetBackingStore().)
+ // Thus implementers should generally paint as much of |rect| as possible
+ // synchronously with as little overpainting as possible.
virtual void DidPaintRect(const gfx::Rect& rect) = 0;
// Informs the view that a portion of the widget's backing store was scrolled
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.cc ('k') | chrome/browser/renderer_host/render_widget_host_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698