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

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

Issue 2551083003: Add Satisfy() and Require() to MojoCompositorFrameSink (Closed)
Patch Set: Rebase; changed LOG to DLOG 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/compositor_frame_sink_support.h » ('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_frame_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 14
14 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame 15 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame
15 // structs. A CompositorFrame contains the complete output meant for display. 16 // structs. A CompositorFrame contains the complete output meant for display.
16 // 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
17 // 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
18 // screen. 19 // screen.
19 interface MojoCompositorFrameSink { 20 interface MojoCompositorFrameSink {
20 // 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
21 // BeginFrame event. 22 // BeginFrame event.
22 SetNeedsBeginFrame(bool needs_begin_frame); 23 SetNeedsBeginFrame(bool needs_begin_frame);
(...skipping 12 matching lines...) Expand all
35 // Adds surface references. 36 // Adds surface references.
36 AddSurfaceReferences(array<SurfaceReference> references); 37 AddSurfaceReferences(array<SurfaceReference> references);
37 38
38 // Removes surface references. 39 // Removes surface references.
39 RemoveSurfaceReferences(array<SurfaceReference> references); 40 RemoveSurfaceReferences(array<SurfaceReference> references);
40 41
41 // Notify that the surface is no longer in use (and is okay to be evicted) so 42 // Notify that the surface is no longer in use (and is okay to be evicted) so
42 // that its resources gets returned in time. 43 // that its resources gets returned in time.
43 EvictFrame(); 44 EvictFrame();
44 45
46 // TODO(staraz): Delete Require() and Satisfy() once surface references
47 // (CL 2541683004) are ready.
48 // Add the provided |sequence| as a destruction dependency of the
49 // surface associated with the provided |local_frame_id|.
50 Require(cc.mojom.LocalFrameId local_frame_id,
51 cc.mojom.SurfaceSequence sequence);
52
53 // Mark the sequence as satisfied and garbage collect surfaces.
54 Satisfy(cc.mojom.SurfaceSequence sequence);
55
45 // TODO(fsamuel): ReadbackBitmap API would be useful here. 56 // TODO(fsamuel): ReadbackBitmap API would be useful here.
46 }; 57 };
47 58
48 interface MojoCompositorFrameSinkClient { 59 interface MojoCompositorFrameSinkClient {
49 // Notification that the previous CompositorFrame given to 60 // Notification that the previous CompositorFrame given to
50 // SubmitCompositorFrame() has been processed and that another frame 61 // SubmitCompositorFrame() has been processed and that another frame
51 // can be submitted. This provides backpressure from the display compositor 62 // can be submitted. This provides backpressure from the display compositor
52 // so that frames are submitted only at the rate it can handle them. 63 // so that frames are submitted only at the rate it can handle them.
53 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. 64 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame.
54 // However, there's a fair amount of cleanup and refactoring necessary to get 65 // However, there's a fair amount of cleanup and refactoring necessary to get
(...skipping 11 matching lines...) Expand all
66 }; 77 };
67 78
68 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set 79 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set
69 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is 80 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is
70 // called from here in order to ensure that hierarchy registration does not race 81 // called from here in order to ensure that hierarchy registration does not race
71 // CompositorFrameSink creation. 82 // CompositorFrameSink creation.
72 interface MojoCompositorFrameSinkPrivate { 83 interface MojoCompositorFrameSinkPrivate {
73 AddChildFrameSink(FrameSinkId child_frame_sink_id); 84 AddChildFrameSink(FrameSinkId child_frame_sink_id);
74 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); 85 RemoveChildFrameSink(FrameSinkId child_frame_sink_id);
75 }; 86 };
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698