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

Unified Diff: content/browser/renderer_host/compositing_iosurface_layer_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
« no previous file with comments | « no previous file | content/browser/renderer_host/compositing_iosurface_layer_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/compositing_iosurface_layer_mac.h
diff --git a/content/browser/renderer_host/compositing_iosurface_layer_mac.h b/content/browser/renderer_host/compositing_iosurface_layer_mac.h
index a03ab1cb5dfd9beb4711c0576c6979b63177f320..af5d5b38e9dff943372ce880702184a018fa64f8 100644
--- a/content/browser/renderer_host/compositing_iosurface_layer_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_layer_mac.h
@@ -20,6 +20,11 @@ class RenderWidgetHostViewMac;
@private
content::RenderWidgetHostViewMac* renderWidgetHostView_;
scoped_refptr<content::CompositingIOSurfaceContext> context_;
+
+ // Used to track when canDrawInCGLContext should return YES. This can be
+ // in response to receiving a new compositor frame, or from any of the events
+ // that cause setNeedsDisplay to be called on the layer.
+ BOOL needsDisplay_;
}
@property(nonatomic, readonly)
@@ -35,6 +40,13 @@ class RenderWidgetHostViewMac;
// |renderWidgetHostView_| is no longer valid and may no longer be dereferenced.
- (void)disableCompositing;
+// Called when a new frame is received.
+- (void)gotNewFrame;
+
+// Called when it has been a while since a new frame has been received, and the
+// layer should become not-asynchronous.
+- (void)timerSinceGotNewFrameFired;
+
@end
#endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
« no previous file with comments | « no previous file | content/browser/renderer_host/compositing_iosurface_layer_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698