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

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: Comments from danakj. 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..22092c56e8bdeeebd49383cca8d7abc17ed23822 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,12 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
}
RenderViewHost* rvh = RenderViewHost::From(render_widget_host_);
+ bool needs_begin_frames = true;
if (rvh) {
danakj 2016/12/15 17:30:10 Can you add a TODO to remove this condition?
erikchen 2016/12/15 19:28:22 Done.
// 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 +499,13 @@ 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.
+ //
danakj 2016/12/15 17:30:10 nit: just one line between paragraphs
erikchen 2016/12/15 19:28:22 Done.
+ //
+ // 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