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

Unified Diff: cc/ipc/mojo_compositor_frame_sink.mojom

Issue 2430653002: Mus+Ash: Towards Unifying CompositorFrameSink terminology (Closed)
Patch Set: Fix bitmap_uploader Created 4 years, 2 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: cc/ipc/mojo_compositor_frame_sink.mojom
diff --git a/cc/ipc/mojo_compositor_frame_sink.mojom b/cc/ipc/mojo_compositor_frame_sink.mojom
index 7731adccfe2e6a92bd3b00d0578f10a543e9586f..053138eb24a78527225c668ecc42f7e910c4c17e 100644
--- a/cc/ipc/mojo_compositor_frame_sink.mojom
+++ b/cc/ipc/mojo_compositor_frame_sink.mojom
@@ -13,19 +13,25 @@ import "cc/ipc/returned_resource.mojom";
// is responsible for creating a CompositorFrame to update its portion of the
// screen.
interface MojoCompositorFrameSink {
- // After the submitted frame is either drawn for the first time by the display
- // compositor or discarded, the callback will be called. Clients should use
- // this acknowledgement to ratelimit frame submissions.
- // TODO(fsamuel): We should support identifying the CF in the callback.
- SubmitCompositorFrame(cc.mojom.CompositorFrame frame) => ();
-
// Lets the display compositor know that the client wishes to receive the next
// BeginFrame event.
SetNeedsBeginFrame(bool needs_begin_frame);
+ // For successful swaps, the implementation must call
rjkroege 2016/10/20 21:33:17 this is top level documentation for how to use the
Fady Samuel 2016/10/20 23:04:10 Added more details.
+ // DidReceiveCompositorFrameAck() asynchronously when the frame has been
+ // processed in order to unthrottle the next frame.
+ SubmitCompositorFrame(cc.mojom.CompositorFrame frame);
+
// TODO(fsamuel): ReadbackBitmap API would be useful here.
};
interface MojoCompositorFrameSinkClient {
- ReturnResources(ReturnedResourceArray resources);
+ // Notification that the previous CompositorFrame given to
+ // SubmitCompositorFrame() has been processed and that another frame
+ // can be submitted. This provides backpressure from the display compositor
+ // so that frames are submitted only at the rate it can handle them.
+ DidReceiveCompositorFrameAck();
rjkroege 2016/10/20 21:33:17 why do we have this given UBF? Let the compositor
Fady Samuel 2016/10/20 23:04:10 Added TODO.
+
+ // Returns resources sent to SubmitCompositorFrame to be reused or freed.
+ ReclaimResources(ReturnedResourceArray resources);
};

Powered by Google App Engine
This is Rietveld 408576698