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

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

Issue 2661543002: Rename LocalFrameId to LocalSurfaceId (Closed)
Patch Set: c Created 3 years, 10 months 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 | « cc/ipc/local_surface_id_struct_traits.h ('k') | cc/ipc/struct_traits_unittest.cc » ('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/local_surface_id.mojom";
11 import "cc/ipc/surface_reference.mojom"; 11 import "cc/ipc/surface_reference.mojom";
12 import "cc/ipc/returned_resource.mojom"; 12 import "cc/ipc/returned_resource.mojom";
13 import "cc/ipc/surface_sequence.mojom"; 13 import "cc/ipc/surface_sequence.mojom";
14 14
15 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame 15 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame
16 // structs. A CompositorFrame contains the complete output meant for display. 16 // structs. A CompositorFrame contains the complete output meant for display.
17 // Each time a client has a graphical update, and receives an OnBeginFrame, it 17 // 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 18 // is responsible for creating a CompositorFrame to update its portion of the
19 // screen. 19 // screen.
20 interface MojoCompositorFrameSink { 20 interface MojoCompositorFrameSink {
21 // Lets the display compositor know that the client wishes to receive the next 21 // Lets the display compositor know that the client wishes to receive the next
22 // BeginFrame event. 22 // BeginFrame event.
23 SetNeedsBeginFrame(bool needs_begin_frame); 23 SetNeedsBeginFrame(bool needs_begin_frame);
24 24
25 // Submits a CompositorFrame to the display compositor that will be presented 25 // Submits a CompositorFrame to the display compositor that will be presented
26 // to screen the next time frames from all CompositorFrameSinks are aggregated 26 // to screen the next time frames from all CompositorFrameSinks are aggregated
27 // to produce a display CompositorFrame. If a client wishes to allocate a new 27 // to produce a display CompositorFrame. If a client wishes to allocate a new
28 // surface (e.g. during resize), then it can simply allocate a new 28 // surface (e.g. during resize), then it can simply allocate a new
29 // |local_frame_id|. 29 // |local_surface_id|.
30 // For successful swaps, the implementation must call 30 // For successful swaps, the implementation must call
31 // DidReceiveCompositorFrameAck() asynchronously when the frame has been 31 // DidReceiveCompositorFrameAck() asynchronously when the frame has been
32 // processed in order to unthrottle the next frame. 32 // processed in order to unthrottle the next frame.
33 SubmitCompositorFrame(cc.mojom.LocalFrameId local_frame_id, 33 SubmitCompositorFrame(cc.mojom.LocalSurfaceId local_surface_id,
34 cc.mojom.CompositorFrame frame); 34 cc.mojom.CompositorFrame frame);
35 35
36 // Notify that the surface is no longer in use (and is okay to be evicted) so 36 // Notify that the surface is no longer in use (and is okay to be evicted) so
37 // that its resources gets returned in time. 37 // that its resources gets returned in time.
38 EvictFrame(); 38 EvictFrame();
39 39
40 // TODO(staraz): Delete Require() and Satisfy() once surface references 40 // TODO(staraz): Delete Require() and Satisfy() once surface references
41 // (CL 2541683004) are ready. 41 // (CL 2541683004) are ready.
42 // Add the provided |sequence| as a destruction dependency of the 42 // Add the provided |sequence| as a destruction dependency of the
43 // surface associated with the provided |local_frame_id|. 43 // surface associated with the provided |local_surface_id|.
44 Require(cc.mojom.LocalFrameId local_frame_id, 44 Require(cc.mojom.LocalSurfaceId local_surface_id,
45 cc.mojom.SurfaceSequence sequence); 45 cc.mojom.SurfaceSequence sequence);
46 46
47 // Mark the sequence as satisfied and garbage collect surfaces. 47 // Mark the sequence as satisfied and garbage collect surfaces.
48 Satisfy(cc.mojom.SurfaceSequence sequence); 48 Satisfy(cc.mojom.SurfaceSequence sequence);
49 49
50 // TODO(fsamuel): ReadbackBitmap API would be useful here. 50 // TODO(fsamuel): ReadbackBitmap API would be useful here.
51 }; 51 };
52 52
53 interface MojoCompositorFrameSinkClient { 53 interface MojoCompositorFrameSinkClient {
54 // Notification that the previous CompositorFrame given to 54 // Notification that the previous CompositorFrame given to
(...skipping 16 matching lines...) Expand all
71 }; 71 };
72 72
73 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set 73 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set
74 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is 74 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is
75 // called from here in order to ensure that hierarchy registration does not race 75 // called from here in order to ensure that hierarchy registration does not race
76 // CompositorFrameSink creation. 76 // CompositorFrameSink creation.
77 interface MojoCompositorFrameSinkPrivate { 77 interface MojoCompositorFrameSinkPrivate {
78 AddChildFrameSink(FrameSinkId child_frame_sink_id); 78 AddChildFrameSink(FrameSinkId child_frame_sink_id);
79 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); 79 RemoveChildFrameSink(FrameSinkId child_frame_sink_id);
80 }; 80 };
OLDNEW
« no previous file with comments | « cc/ipc/local_surface_id_struct_traits.h ('k') | cc/ipc/struct_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698