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

Unified Diff: chrome/renderer/render_widget.cc

Issue 3397008: Skip screen update when the WebView isn't ready to paint. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: took the feedback Created 10 years, 3 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 | « chrome/renderer/render_widget.h ('k') | 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
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 3252097db10ae00b63ee39809fd52ba61abac78c..28385f5fd669d897c2465d92a9b3e6ac09581382 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -588,6 +588,14 @@ void RenderWidget::didInvalidateRect(const WebRect& rect) {
}
}
+ // Painting a not-yet-ready page would cause flicker with white blank.
+ // So InvalidateRect() and PostTask() should be skipped.
+ // Because we expect at least one update after loading the page and
+ // InvalidateRect() without PostTask() can miss it,
+ // We skip both instead of skip only PostTask().
+ if (!IsReadyToPaint())
+ return;
+
// We only want one pending DoDeferredUpdate call at any time...
bool update_pending = paint_aggregator_.HasPendingUpdate();
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698