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

Unified Diff: cc/ipc/mojo_compositor_frame_sink.mojom

Issue 2344183002: Move part of display_compositor's interface to cc/ipc (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/ipc/BUILD.gn ('k') | services/ui/gpu/display_compositor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/mojo_compositor_frame_sink.mojom
diff --git a/cc/ipc/mojo_compositor_frame_sink.mojom b/cc/ipc/mojo_compositor_frame_sink.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..4bb9db7a8e5b2cdb7a9b3744ae3dd56158df9c07
--- /dev/null
+++ b/cc/ipc/mojo_compositor_frame_sink.mojom
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import "cc/ipc/compositor_frame.mojom";
+import "cc/ipc/returned_resource.mojom";
+
Fady Samuel 2016/09/16 14:08:02 Please place in module cc.mojom;
xidachen 2016/09/16 14:32:00 Done.
+// A MojoCompositorFrameSink is an interface for receiving CompositorFrame
+// structs. A CompositorFrame contains the complete output meant for display.
+// Each time a client has a graphical update, and receives an OnBeginFrame, it
+// is responsible for creating a CompositorFrame to update its portion of the
+// screen.
+interface MojoCompositorFrameSink {
Fady Samuel 2016/09/16 14:08:02 Please rename to CompositorFrameSink. Mojo is redu
xidachen 2016/09/16 14:32:00 This prefix is suggested by Dana. Her concern is t
Fady Samuel 2016/09/16 14:35:50 Dana, Xida, we place all cc mojo interfaces in a c
danakj 2016/09/16 17:56:37 I asked for it. When we talk about classes we talk
Fady Samuel 2016/09/16 18:00:36 Sure. sgtm
+ // After the submitted frame is either drawn for the first time by the display
+ // compositor or discarded, the callback will be called. Clients should use
+ // this acknowledgement to ratelimit frame submissions.
+ // TODO(fsamuel): We should support identifying the CF in the callback.
+ SubmitCompositorFrame(cc.mojom.CompositorFrame frame) => ();
Fady Samuel 2016/09/16 14:08:03 I don't think we need the callback? danakj@ could
xidachen 2016/09/16 14:32:00 I will defer that to danakj@. Thanks.
danakj 2016/09/16 17:56:37 We still need a swap ack for now, scheduler would
Fady Samuel 2016/09/16 18:00:36 OK
+
+ // Lets the display compositor know that the client wishes to receive the next
+ // BeginFrame event.
+ SetNeedsBeginFrame(bool needs_begin_frame);
+
+ // TODO(fsamuel): ReadbackBitmap API would be useful here.
+};
+
+interface MojoCompositorFrameSinkClient {
Fady Samuel 2016/09/16 14:08:02 Drop mojo please. It's redundant.
+ ReturnResources(array<cc.mojom.ReturnedResource> resources);
+};
« no previous file with comments | « cc/ipc/BUILD.gn ('k') | services/ui/gpu/display_compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698