| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..902eefab0330ced4dd3e80e95f2413bda5688457
|
| --- /dev/null
|
| +++ b/cc/ipc/mojo_compositor_frame_sink.mojom
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +module cc.mojom;
|
| +
|
| +import "cc/ipc/compositor_frame.mojom";
|
| +import "cc/ipc/returned_resource.mojom";
|
| +
|
| +// A MojoCompositorFrameSink is an interface for receiving CompositorFrame
|
| +// structs. A CompositorFrame contains the complete output meant for display.
|
| +// Each time a client has a graphical update, and receives an OnBeginFrame, it
|
| +// 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);
|
| +
|
| + // TODO(fsamuel): ReadbackBitmap API would be useful here.
|
| +};
|
| +
|
| +interface MojoCompositorFrameSinkClient {
|
| + ReturnResources(array<cc.mojom.ReturnedResource> resources);
|
| +};
|
|
|