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); |
}; |