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

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

Issue 2676353002: MojoCompositorFrameSinkPrivate should support copy requests (Closed)
Patch Set: Remove callback 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 | « 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/copy_output_request.mojom";
9 import "cc/ipc/frame_sink_id.mojom"; 10 import "cc/ipc/frame_sink_id.mojom";
10 import "cc/ipc/local_surface_id.mojom"; 11 import "cc/ipc/local_surface_id.mojom";
11 import "cc/ipc/surface_reference.mojom"; 12 import "cc/ipc/surface_reference.mojom";
12 import "cc/ipc/returned_resource.mojom"; 13 import "cc/ipc/returned_resource.mojom";
13 import "cc/ipc/surface_sequence.mojom"; 14 import "cc/ipc/surface_sequence.mojom";
14 15
15 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame 16 // A MojoCompositorFrameSink is an interface for receiving CompositorFrame
16 // structs. A CompositorFrame contains the complete output meant for display. 17 // structs. A CompositorFrame contains the complete output meant for display.
17 // Each time a client has a graphical update, and receives an OnBeginFrame, it 18 // 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 19 // is responsible for creating a CompositorFrame to update its portion of the
(...skipping 20 matching lines...) Expand all
39 40
40 // TODO(staraz): Delete Require() and Satisfy() once surface references 41 // TODO(staraz): Delete Require() and Satisfy() once surface references
41 // (CL 2541683004) are ready. 42 // (CL 2541683004) are ready.
42 // Add the provided |sequence| as a destruction dependency of the 43 // Add the provided |sequence| as a destruction dependency of the
43 // surface associated with the provided |local_surface_id|. 44 // surface associated with the provided |local_surface_id|.
44 Require(cc.mojom.LocalSurfaceId local_surface_id, 45 Require(cc.mojom.LocalSurfaceId local_surface_id,
45 cc.mojom.SurfaceSequence sequence); 46 cc.mojom.SurfaceSequence sequence);
46 47
47 // Mark the sequence as satisfied and garbage collect surfaces. 48 // Mark the sequence as satisfied and garbage collect surfaces.
48 Satisfy(cc.mojom.SurfaceSequence sequence); 49 Satisfy(cc.mojom.SurfaceSequence sequence);
49
50 // TODO(fsamuel): ReadbackBitmap API would be useful here.
51 }; 50 };
52 51
53 interface MojoCompositorFrameSinkClient { 52 interface MojoCompositorFrameSinkClient {
54 // Notification that the previous CompositorFrame given to 53 // Notification that the previous CompositorFrame given to
55 // SubmitCompositorFrame() has been processed and that another frame 54 // SubmitCompositorFrame() has been processed and that another frame
56 // can be submitted. This provides backpressure from the display compositor 55 // can be submitted. This provides backpressure from the display compositor
57 // so that frames are submitted only at the rate it can handle them. 56 // 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. 57 // 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 58 // However, there's a fair amount of cleanup and refactoring necessary to get
60 // rid of it. 59 // rid of it.
61 DidReceiveCompositorFrameAck(); 60 DidReceiveCompositorFrameAck();
62 61
63 // Notification for the client to generate a CompositorFrame. 62 // Notification for the client to generate a CompositorFrame.
64 OnBeginFrame(BeginFrameArgs args); 63 OnBeginFrame(BeginFrameArgs args);
65 64
66 // Returns resources sent to SubmitCompositorFrame to be reused or freed. 65 // Returns resources sent to SubmitCompositorFrame to be reused or freed.
67 ReclaimResources(ReturnedResourceArray resources); 66 ReclaimResources(ReturnedResourceArray resources);
68 67
69 // Called when surface is being scheduled for a draw. 68 // Called when surface is being scheduled for a draw.
70 WillDrawSurface(); 69 WillDrawSurface();
71 }; 70 };
72 71
73 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set 72 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set
74 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is 73 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is
75 // called from here in order to ensure that hierarchy registration does not race 74 // called from here in order to ensure that hierarchy registration does not race
76 // CompositorFrameSink creation. 75 // CompositorFrameSink creation.
77 interface MojoCompositorFrameSinkPrivate { 76 interface MojoCompositorFrameSinkPrivate {
78 AddChildFrameSink(FrameSinkId child_frame_sink_id); 77 AddChildFrameSink(FrameSinkId child_frame_sink_id);
79 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); 78 RemoveChildFrameSink(FrameSinkId child_frame_sink_id);
79
80 // Requests that the renderer send back a copy of the surface that this
81 // CompositorFrameSink submits to. The result can be in form of a bitmap
82 // or a texture. See cc::CopyOutputRequest.
83 RequestCopyOfSurface(cc.mojom.CopyOutputRequest request);
80 }; 84 };
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