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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 1376003002: Make rendering timeouts work even if paint data received early (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cursor
Patch Set: Review comments addressed Created 5 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
Index: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 17e3e82bff430ca29fc5826587cb998ecfb9a050..6843bea6313d4c1f4e45228046db4223ce069835 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -263,9 +263,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// a new compositor frame is not received before it expires.
void StartNewContentRenderingTimeout();
- // Stops the rendering timeout and prevents it from clearing any displayed
- // graphics.
- void StopNewContentRenderingTimeout();
+ // Notification that a new compositor frame has been generated following
+ // a page load. This stops |new_content_rendering_timeout_|, or prevents
+ // the timer from running if the load commit message hasn't been received
+ // yet.
+ void OnFirstPaintAfterLoad();
// Forwards the given message to the renderer. These are called by the view
// when it has received a message.
@@ -810,6 +812,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl
scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
scoped_ptr<TimeoutMonitor> new_content_rendering_timeout_;
+ // This boolean is true if RenderWidgetHostImpl receives a compositor frame
Charlie Reis 2015/09/30 21:42:09 nit: Add blank line above.
kenrb 2015/10/01 12:45:09 Done.
+ // from a newly loaded page before OnFirstPaintAfterLoad() is called. In
Charlie Reis 2015/09/30 21:42:09 Wait, that's not right. It's true if the composit
kenrb 2015/10/01 12:45:09 Rewritten and expanded.
+ // that case |new_content_rendering_timeout_| is not needed, because the
+ // paint preceded the load commit notification.
+ bool received_paint_after_load_;
#if defined(OS_WIN)
std::list<HWND> dummy_windows_for_activation_;

Powered by Google App Engine
This is Rietveld 408576698