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

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

Issue 2493223002: Change exo::SurfaceFactoryOwner to exo::ExoCompositorFrameSink (Closed)
Patch Set: Code clean up 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
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/local_frame_id.mojom";
(...skipping 13 matching lines...) Expand all
24 // to screen the next time frames from all CompositorFrameSinks are aggregated 24 // to screen the next time frames from all CompositorFrameSinks are aggregated
25 // to produce a display CompositorFrame. If a client wishes to allocate a new 25 // to produce a display CompositorFrame. If a client wishes to allocate a new
26 // surface (e.g. during resize), then it can simply allocate a new 26 // surface (e.g. during resize), then it can simply allocate a new
27 // |local_frame_id|. 27 // |local_frame_id|.
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 EvictFrame();
Fady Samuel 2016/12/01 20:38:46 Add a comment explaining what this does.
Alex Z. 2016/12/06 20:10:40 This is done is the separate CL.
35
34 // TODO(fsamuel): ReadbackBitmap API would be useful here. 36 // TODO(fsamuel): ReadbackBitmap API would be useful here.
35 }; 37 };
36 38
37 interface MojoCompositorFrameSinkClient { 39 interface MojoCompositorFrameSinkClient {
38 // Notification that the previous CompositorFrame given to 40 // Notification that the previous CompositorFrame given to
39 // SubmitCompositorFrame() has been processed and that another frame 41 // SubmitCompositorFrame() has been processed and that another frame
40 // can be submitted. This provides backpressure from the display compositor 42 // can be submitted. This provides backpressure from the display compositor
41 // so that frames are submitted only at the rate it can handle them. 43 // so that frames are submitted only at the rate it can handle them.
42 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. 44 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame.
43 // However, there's a fair amount of cleanup and refactoring necessary to get 45 // However, there's a fair amount of cleanup and refactoring necessary to get
44 // rid of it. 46 // rid of it.
45 DidReceiveCompositorFrameAck(); 47 DidReceiveCompositorFrameAck();
46 48
47 // Notification for the client to generate a CompositorFrame. 49 // Notification for the client to generate a CompositorFrame.
48 OnBeginFrame(BeginFrameArgs args); 50 OnBeginFrame(BeginFrameArgs args);
49 51
50 // Returns resources sent to SubmitCompositorFrame to be reused or freed. 52 // Returns resources sent to SubmitCompositorFrame to be reused or freed.
51 ReclaimResources(ReturnedResourceArray resources); 53 ReclaimResources(ReturnedResourceArray resources);
54
55 WillDrawSurface();
Fady Samuel 2016/12/01 20:38:46 Add a comment explaining when this is called.
Alex Z. 2016/12/06 20:10:41 This is done is the separate CL.
52 }; 56 };
53 57
54 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set 58 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set
55 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is 59 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is
56 // called from here in order to ensure that hierarchy registration does not race 60 // called from here in order to ensure that hierarchy registration does not race
57 // CompositorFrameSink creation. 61 // CompositorFrameSink creation.
58 interface MojoCompositorFrameSinkPrivate { 62 interface MojoCompositorFrameSinkPrivate {
59 AddChildFrameSink(FrameSinkId child_frame_sink_id); 63 AddChildFrameSink(FrameSinkId child_frame_sink_id);
60 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); 64 RemoveChildFrameSink(FrameSinkId child_frame_sink_id);
61 }; 65 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698