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

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

Issue 408153002: Mac: Fix janky YouTube animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/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 a60a64174e39f7e3f2af22148802bdd82d7baefc..d1232efc9dac365971c69af19c2b1751c4a20bdb 100644
--- a/content/browser/renderer_host/compositing_iosurface_layer_mac.h
+++ b/content/browser/renderer_host/compositing_iosurface_layer_mac.h
@@ -51,10 +51,14 @@ class CompositingIOSurfaceLayerHelper {
// frame.
void DidDraw(bool success);
+ // Immediately re-draw the layer, even if the content has not changed, and
+ // ensure that the frame be acked.
ccameron 2014/07/22 06:40:42 I renamed these methods to be a bit more explicit.
+ void SetNeedsDisplayAndDisplayAndAck();
+
+ // Immediately draw the layer, only if one is pending, and ensure that the
+ // frame be acked.
+ void DisplayIfNeededAndAck();
private:
- // Immediately draw a frame (disregarding vsync) and ensure that the frame is
- // acknowledged.
- void ImmediatelyForceDisplayAndAck();
// Called whenever the frame provided in GotNewFrame should be acknowledged
// (this may be because it was drawn, or it may be to unblock the
@@ -114,6 +118,13 @@ class CompositingIOSurfaceLayerHelper {
// Called when a new frame is received.
- (void)gotNewFrame;
+// Force a draw immediately (even if this means re-displaying a previously
+// displayed frame).
+- (void)setNeedsDisplayAndDisplayAndAck;
+
+// Force a draw immediately, but only if one was requested.
+- (void)displayIfNeededAndAck;
+
@end
#endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698