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

Unified Diff: cc/ipc/mojo_compositor_frame_sink.mojom

Issue 2344183002: Move part of display_compositor's interface to cc/ipc (Closed)
Patch Set: semicolon 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
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..902eefab0330ced4dd3e80e95f2413bda5688457
--- /dev/null
+++ b/cc/ipc/mojo_compositor_frame_sink.mojom
@@ -0,0 +1,31 @@
+// 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.
+
+module cc.mojom;
+
+import "cc/ipc/compositor_frame.mojom";
+import "cc/ipc/returned_resource.mojom";
+
+// 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 {
+ // 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) => ();
+
+ // 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 {
+ ReturnResources(array<cc.mojom.ReturnedResource> resources);
+};

Powered by Google App Engine
This is Rietveld 408576698