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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 2577953002: Fix a bug where an infinite stream of BeginFrame messages are sent to extensions. (Closed)
Patch Set: Remove TODOs. Created 4 years 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: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 5bef4d03ad0ff4c71539729b9cb150b3702aecd1..d7c05d394688908451d1dc31bd77d54eb49d3238 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -484,10 +484,13 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
}
RenderViewHost* rvh = RenderViewHost::From(render_widget_host_);
+ bool needs_begin_frames = true;
+
if (rvh) {
// TODO(mostynb): actually use prefs. Landing this as a separate CL
// first to rebaseline some unreliable layout tests.
ignore_result(rvh->GetWebkitPreferences());
+ needs_begin_frames = !rvh->GetDelegate()->IsNeverVisible();
}
if (GetTextInputManager())
@@ -497,10 +500,12 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
// in RenderMessageFilter::OnMessageReceived), SetNeedsBeginFrame
// messages are not delayed on Mac. This leads to creation-time
// raciness where renderer sends a SetNeedsBeginFrame(true) before
- // the renderer host is created to recieve it. In general, all
- // renderers want begin frames initially anyway, so start this value
- // at true here to avoid startup raciness and decrease latency.
- needs_begin_frames_ = true;
+ // the renderer host is created to recieve it.
+ //
+ // Any renderer that will produce frames needs to have begin frames sent to
+ // it. So unless it is never visible, start this value at true here to avoid
+ // startup raciness and decrease latency.
+ needs_begin_frames_ = needs_begin_frames;
UpdateNeedsBeginFramesInternal();
}
« 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