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

Unified Diff: mojo/services/ui/views/interfaces/view_trees.mojom

Issue 1775143004: Mozart: Directly associate the renderer with the view tree. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-1
Patch Set: Created 4 years, 9 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: mojo/services/ui/views/interfaces/view_trees.mojom
diff --git a/mojo/services/ui/views/interfaces/view_trees.mojom b/mojo/services/ui/views/interfaces/view_trees.mojom
index 5b2c09c8578e627f15baef7ed575ad053962ffdf..7763b7183ae95413999bcf8b79f116266f521ed5 100644
--- a/mojo/services/ui/views/interfaces/view_trees.mojom
+++ b/mojo/services/ui/views/interfaces/view_trees.mojom
@@ -6,6 +6,7 @@
module mojo.ui;
import "mojo/public/interfaces/application/service_provider.mojom";
+import "mojo/services/gfx/composition/interfaces/renderers.mojom";
import "mojo/services/ui/views/interfaces/layouts.mojom";
import "mojo/services/ui/views/interfaces/views.mojom";
@@ -73,6 +74,14 @@ interface ViewTree {
// See |mojo.ui.InputDispatcher|.
GetServiceProvider(mojo.ServiceProvider& service_provider);
+ // Sets where the view tree's scene graph will be rendered.
+ //
+ // If |renderer| is null, disconnects the view tree from the renderer
+ // causing its previous renderer to be destroyed.
+ //
+ // See also: |mojo.gfx.composition.Compositor.CreateRenderer()|.
+ SetRenderer(mojo.gfx.composition.Renderer? renderer);
+
// Requests that the view tree's OnLayout() method be called to compute a
// new layout due to a change in the view tree's layout information.
RequestLayout();
@@ -153,4 +162,10 @@ interface ViewTreeListener {
// The implementation should invoke the callback once the event has
// been handled.
OnRootUnavailable(uint32 root_key) => ();
+
+ // Called when the tree's renderer connection closed unexpectedly.
+ //
+ // The implementation should invoke the callback once the event has
+ // been handled.
+ OnRendererDied() => ();
};

Powered by Google App Engine
This is Rietveld 408576698