mus-ws: Plumb FrameSinkId to Children
This CL takes us a step closer to surface synchronization by plumbing the
correct FrameSinkId to children and delaying CompositorFrameSink creation
until the FrameSinkId is propagated to the child.
FrameSinkIds are plumbed to children via:
1. WindowTreeClient::OnTopLevelCreated
-- for top level windows like Chrome
2. WindowTreeClient::OnEmbed
-- for embedded apps and OOPIFs
3. WindowManager::WmNewDisplayAdded
-- for the window manager's CompositorFrameSink
Requesting a CompositorFrameSink from WindowPortMus is now async,
and completes when the FrameSinkId is available.
BUG=672962
[email protected]
Review-Url: https://codereview.chromium.org/2764433003
Cr-Commit-Position: refs/heads/master@{#458703}
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 951c1af..408fe12 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1889,11 +1889,10 @@
callback.Run(nullptr);
return;
}
- callback.Run(RendererWindowTreeClient::Get(routing_id)
- ->CreateCompositorFrameSink(
- cc::FrameSinkId(client_id_, routing_id),
- gpu_->CreateContextProvider(std::move(channel)),
- GetGpuMemoryBufferManager()));
+ RendererWindowTreeClient::Get(routing_id)
+ ->RequestCompositorFrameSink(
+ gpu_->CreateContextProvider(std::move(channel)),
+ GetGpuMemoryBufferManager(), callback);
return;
}
#endif