| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module cc.mojom; | 5 module cc.mojom; |
| 6 | 6 |
| 7 import "cc/ipc/begin_frame_args.mojom"; | 7 import "cc/ipc/begin_frame_args.mojom"; |
| 8 import "cc/ipc/compositor_frame.mojom"; | 8 import "cc/ipc/compositor_frame.mojom"; |
| 9 import "cc/ipc/frame_sink_id.mojom"; | 9 import "cc/ipc/frame_sink_id.mojom"; |
| 10 import "cc/ipc/local_frame_id.mojom"; | 10 import "cc/ipc/local_frame_id.mojom"; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // For successful swaps, the implementation must call | 28 // For successful swaps, the implementation must call |
| 29 // DidReceiveCompositorFrameAck() asynchronously when the frame has been | 29 // DidReceiveCompositorFrameAck() asynchronously when the frame has been |
| 30 // processed in order to unthrottle the next frame. | 30 // processed in order to unthrottle the next frame. |
| 31 SubmitCompositorFrame(cc.mojom.LocalFrameId local_frame_id, | 31 SubmitCompositorFrame(cc.mojom.LocalFrameId local_frame_id, |
| 32 cc.mojom.CompositorFrame frame); | 32 cc.mojom.CompositorFrame frame); |
| 33 | 33 |
| 34 // Notify that the surface is no longer in use (and is okay to be evicted) so | 34 // Notify that the surface is no longer in use (and is okay to be evicted) so |
| 35 // that its resources gets returned in time. | 35 // that its resources gets returned in time. |
| 36 EvictFrame(); | 36 EvictFrame(); |
| 37 | 37 |
| 38 // Notifies the frame sink that a BeginFrame was completed, but that no |
| 39 // CompositorFrame was produced as a result of it. |
| 40 BeginFrameDidNotDraw(BeginFrameAck ack); |
| 41 |
| 38 // TODO(fsamuel): ReadbackBitmap API would be useful here. | 42 // TODO(fsamuel): ReadbackBitmap API would be useful here. |
| 39 }; | 43 }; |
| 40 | 44 |
| 41 interface MojoCompositorFrameSinkClient { | 45 interface MojoCompositorFrameSinkClient { |
| 42 // Notification that the previous CompositorFrame given to | 46 // Notification that the previous CompositorFrame given to |
| 43 // SubmitCompositorFrame() has been processed and that another frame | 47 // SubmitCompositorFrame() has been processed and that another frame |
| 44 // can be submitted. This provides backpressure from the display compositor | 48 // can be submitted. This provides backpressure from the display compositor |
| 45 // so that frames are submitted only at the rate it can handle them. | 49 // so that frames are submitted only at the rate it can handle them. |
| 46 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. | 50 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. |
| 47 // However, there's a fair amount of cleanup and refactoring necessary to get | 51 // However, there's a fair amount of cleanup and refactoring necessary to get |
| (...skipping 11 matching lines...) Expand all Loading... |
| 59 }; | 63 }; |
| 60 | 64 |
| 61 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set | 65 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set |
| 62 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is | 66 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is |
| 63 // called from here in order to ensure that hierarchy registration does not race | 67 // called from here in order to ensure that hierarchy registration does not race |
| 64 // CompositorFrameSink creation. | 68 // CompositorFrameSink creation. |
| 65 interface MojoCompositorFrameSinkPrivate { | 69 interface MojoCompositorFrameSinkPrivate { |
| 66 AddChildFrameSink(FrameSinkId child_frame_sink_id); | 70 AddChildFrameSink(FrameSinkId child_frame_sink_id); |
| 67 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); | 71 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); |
| 68 }; | 72 }; |
| OLD | NEW |