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

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

Issue 165623002: Dynamically set CAOpenGLLAyer to be asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 6 years, 10 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_view_mac.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 2c3d44ffffee265d0813f9ced4f651e46d4daef3..e1416331a55436eebc65f44105720cda45ea4a4d 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -435,6 +435,11 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_;
scoped_refptr<CompositingIOSurfaceContext> compositing_iosurface_context_;
+ // Timer used to dynamically transition the compositing layer in and out of
+ // asynchronous mode.
+ base::DelayTimer<RenderWidgetHostViewMac>
+ compositing_iosurface_layer_async_timer_;
+
// This holds the current software compositing framebuffer, if any.
scoped_ptr<SoftwareFrameManager> software_frame_manager_;
@@ -512,6 +517,10 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase,
// Called when a software DIB is received.
void GotSoftwareFrame();
+ // Called if it has been a quarter-second since a GPU SwapBuffers has been
+ // received. In this case, switch from polling for frames to pushing them.
+ void TimerSinceGotAcceleratedFrameFired();
+
void OnPluginFocusChanged(bool focused, int plugin_id);
void OnStartPluginIme();

Powered by Google App Engine
This is Rietveld 408576698