OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module cc.mojom; |
| 6 |
| 7 import "cc/ipc/compositor_frame.mojom"; |
| 8 import "cc/ipc/returned_resource.mojom"; |
| 9 |
| 10 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame |
| 11 // structs. A CompositorFrame contains the complete output meant for display. |
| 12 // Each time a client has a graphical update, and receives an OnBeginFrame, it |
| 13 // is responsible for creating a CompositorFrame to update its portion of the |
| 14 // screen. |
| 15 interface MojoCompositorFrameSink { |
| 16 // After the submitted frame is either drawn for the first time by the display |
| 17 // compositor or discarded, the callback will be called. Clients should use |
| 18 // this acknowledgement to ratelimit frame submissions. |
| 19 // TODO(fsamuel): We should support identifying the CF in the callback. |
| 20 SubmitCompositorFrame(cc.mojom.CompositorFrame frame) => (); |
| 21 |
| 22 // Lets the display compositor know that the client wishes to receive the next |
| 23 // BeginFrame event. |
| 24 SetNeedsBeginFrame(bool needs_begin_frame); |
| 25 |
| 26 // TODO(fsamuel): ReadbackBitmap API would be useful here. |
| 27 }; |
| 28 |
| 29 interface MojoCompositorFrameSinkClient { |
| 30 ReturnResources(array<cc.mojom.ReturnedResource> resources); |
| 31 }; |
OLD | NEW |