Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: cc/ipc/mojo_compositor_frame_sink.mojom

Issue 2527443002: Display Compositor: Allocate LocalFrameId in client. (Closed)
Patch Set: Updated Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/surfaces/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/returned_resource.mojom"; 11 import "cc/ipc/returned_resource.mojom";
11 12
12 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame 13 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame
13 // structs. A CompositorFrame contains the complete output meant for display. 14 // structs. A CompositorFrame contains the complete output meant for display.
14 // Each time a client has a graphical update, and receives an OnBeginFrame, it 15 // Each time a client has a graphical update, and receives an OnBeginFrame, it
15 // is responsible for creating a CompositorFrame to update its portion of the 16 // is responsible for creating a CompositorFrame to update its portion of the
16 // screen. 17 // screen.
17 interface MojoCompositorFrameSink { 18 interface MojoCompositorFrameSink {
18 // Lets the display compositor know that the client wishes to receive the next 19 // Lets the display compositor know that the client wishes to receive the next
19 // BeginFrame event. 20 // BeginFrame event.
20 SetNeedsBeginFrame(bool needs_begin_frame); 21 SetNeedsBeginFrame(bool needs_begin_frame);
21 22
22 // Submits a CompositorFrame to the display compositor that will be presented 23 // Submits a CompositorFrame to the display compositor that will be presented
23 // to screen the next time frames from all CompositorFrameSinks are aggregated 24 // to screen the next time frames from all CompositorFrameSinks are aggregated
24 // to produce a display CompositorFrame. 25 // to produce a display CompositorFrame.
25 // For successful swaps, the implementation must call 26 // For successful swaps, the implementation must call
26 // DidReceiveCompositorFrameAck() asynchronously when the frame has been 27 // DidReceiveCompositorFrameAck() asynchronously when the frame has been
27 // processed in order to unthrottle the next frame. 28 // processed in order to unthrottle the next frame.
28 SubmitCompositorFrame(cc.mojom.CompositorFrame frame); 29 SubmitCompositorFrame(cc.mojom.LocalFrameId local_frame_id,
rjkroege 2016/11/22 18:34:02 Could you document the parameters?
Fady Samuel 2016/11/22 18:39:58 Done.
30 cc.mojom.CompositorFrame frame);
29 31
30 // TODO(fsamuel): ReadbackBitmap API would be useful here. 32 // TODO(fsamuel): ReadbackBitmap API would be useful here.
31 }; 33 };
32 34
33 interface MojoCompositorFrameSinkClient { 35 interface MojoCompositorFrameSinkClient {
34 // Notification that the previous CompositorFrame given to 36 // Notification that the previous CompositorFrame given to
35 // SubmitCompositorFrame() has been processed and that another frame 37 // SubmitCompositorFrame() has been processed and that another frame
36 // can be submitted. This provides backpressure from the display compositor 38 // can be submitted. This provides backpressure from the display compositor
37 // so that frames are submitted only at the rate it can handle them. 39 // so that frames are submitted only at the rate it can handle them.
38 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. 40 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame.
39 // However, there's a fair amount of cleanup and refactoring necessary to get 41 // However, there's a fair amount of cleanup and refactoring necessary to get
40 // rid of it. 42 // rid of it.
41 DidReceiveCompositorFrameAck(); 43 DidReceiveCompositorFrameAck();
42 44
43 // Notification for the client to generate a CompositorFrame. 45 // Notification for the client to generate a CompositorFrame.
44 OnBeginFrame(BeginFrameArgs args); 46 OnBeginFrame(BeginFrameArgs args);
45 47
46 // Returns resources sent to SubmitCompositorFrame to be reused or freed. 48 // Returns resources sent to SubmitCompositorFrame to be reused or freed.
47 ReclaimResources(ReturnedResourceArray resources); 49 ReclaimResources(ReturnedResourceArray resources);
48 }; 50 };
49 51
50 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set 52 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set
51 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is 53 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is
52 // called from here in order to ensure that hierarchy registration does not race 54 // called from here in order to ensure that hierarchy registration does not race
53 // CompositorFrameSink creation. 55 // CompositorFrameSink creation.
54 interface MojoCompositorFrameSinkPrivate { 56 interface MojoCompositorFrameSinkPrivate {
55 AddChildFrameSink(FrameSinkId child_frame_sink_id); 57 AddChildFrameSink(FrameSinkId child_frame_sink_id);
56 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); 58 RemoveChildFrameSink(FrameSinkId child_frame_sink_id);
57 }; 59 };
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698