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/copy_output_request.mojom"; | |
10 import "cc/ipc/copy_output_result.mojom"; | |
9 import "cc/ipc/frame_sink_id.mojom"; | 11 import "cc/ipc/frame_sink_id.mojom"; |
10 import "cc/ipc/local_surface_id.mojom"; | 12 import "cc/ipc/local_surface_id.mojom"; |
11 import "cc/ipc/surface_reference.mojom"; | 13 import "cc/ipc/surface_reference.mojom"; |
12 import "cc/ipc/returned_resource.mojom"; | 14 import "cc/ipc/returned_resource.mojom"; |
13 import "cc/ipc/surface_sequence.mojom"; | 15 import "cc/ipc/surface_sequence.mojom"; |
16 import "gpu/ipc/common/mailbox.mojom"; | |
17 import "gpu/ipc/common/sync_token.mojom"; | |
14 | 18 |
15 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame | 19 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame |
16 // structs. A CompositorFrame contains the complete output meant for display. | 20 // structs. A CompositorFrame contains the complete output meant for display. |
17 // Each time a client has a graphical update, and receives an OnBeginFrame, it | 21 // Each time a client has a graphical update, and receives an OnBeginFrame, it |
18 // is responsible for creating a CompositorFrame to update its portion of the | 22 // is responsible for creating a CompositorFrame to update its portion of the |
19 // screen. | 23 // screen. |
20 interface MojoCompositorFrameSink { | 24 interface MojoCompositorFrameSink { |
21 // Lets the display compositor know that the client wishes to receive the next | 25 // Lets the display compositor know that the client wishes to receive the next |
22 // BeginFrame event. | 26 // BeginFrame event. |
23 SetNeedsBeginFrame(bool needs_begin_frame); | 27 SetNeedsBeginFrame(bool needs_begin_frame); |
(...skipping 16 matching lines...) Expand all Loading... | |
40 // TODO(staraz): Delete Require() and Satisfy() once surface references | 44 // TODO(staraz): Delete Require() and Satisfy() once surface references |
41 // (CL 2541683004) are ready. | 45 // (CL 2541683004) are ready. |
42 // Add the provided |sequence| as a destruction dependency of the | 46 // Add the provided |sequence| as a destruction dependency of the |
43 // surface associated with the provided |local_surface_id|. | 47 // surface associated with the provided |local_surface_id|. |
44 Require(cc.mojom.LocalSurfaceId local_surface_id, | 48 Require(cc.mojom.LocalSurfaceId local_surface_id, |
45 cc.mojom.SurfaceSequence sequence); | 49 cc.mojom.SurfaceSequence sequence); |
46 | 50 |
47 // Mark the sequence as satisfied and garbage collect surfaces. | 51 // Mark the sequence as satisfied and garbage collect surfaces. |
48 Satisfy(cc.mojom.SurfaceSequence sequence); | 52 Satisfy(cc.mojom.SurfaceSequence sequence); |
49 | 53 |
54 RequestCopyOfSurface(cc.mojom.CopyOutputRequest request) | |
55 => (cc.mojom.CopyOutputResult result); | |
56 | |
57 DeleteMailbox(gpu.mojom.Mailbox mailbox, gpu.mojom.SyncToken sync_token, bool is_lost); | |
Fady Samuel
2017/02/06 17:13:48
This is way too generic, in my opinion. Why do we
danakj
2017/02/06 19:18:51
Same, CFS can transport resources but it doesn't m
Fady Samuel
2017/02/06 19:45:02
This sync token indicates when it's safe to delete
Saman Sami
2017/02/06 20:04:00
Can you explain how it should be? I'm basically tr
danakj
2017/02/06 20:09:15
I see, just call this ReleaseMailbox then. It does
danakj
2017/02/06 20:10:27
ReleaseMailboxForCopyOutputResult might work too i
| |
58 | |
50 // TODO(fsamuel): ReadbackBitmap API would be useful here. | 59 // TODO(fsamuel): ReadbackBitmap API would be useful here. |
Fady Samuel
2017/02/06 17:13:49
Delete this?
| |
51 }; | 60 }; |
52 | 61 |
53 interface MojoCompositorFrameSinkClient { | 62 interface MojoCompositorFrameSinkClient { |
54 // Notification that the previous CompositorFrame given to | 63 // Notification that the previous CompositorFrame given to |
55 // SubmitCompositorFrame() has been processed and that another frame | 64 // SubmitCompositorFrame() has been processed and that another frame |
56 // can be submitted. This provides backpressure from the display compositor | 65 // can be submitted. This provides backpressure from the display compositor |
57 // so that frames are submitted only at the rate it can handle them. | 66 // so that frames are submitted only at the rate it can handle them. |
58 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. | 67 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. |
59 // However, there's a fair amount of cleanup and refactoring necessary to get | 68 // However, there's a fair amount of cleanup and refactoring necessary to get |
60 // rid of it. | 69 // rid of it. |
(...skipping 10 matching lines...) Expand all Loading... | |
71 }; | 80 }; |
72 | 81 |
73 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set | 82 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set |
74 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is | 83 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is |
75 // called from here in order to ensure that hierarchy registration does not race | 84 // called from here in order to ensure that hierarchy registration does not race |
76 // CompositorFrameSink creation. | 85 // CompositorFrameSink creation. |
77 interface MojoCompositorFrameSinkPrivate { | 86 interface MojoCompositorFrameSinkPrivate { |
78 AddChildFrameSink(FrameSinkId child_frame_sink_id); | 87 AddChildFrameSink(FrameSinkId child_frame_sink_id); |
79 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); | 88 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); |
80 }; | 89 }; |
OLD | NEW |