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

Unified Diff: ui/aura/mus/mus_context_factory.cc

Issue 2764433003: mus-ws: Plumb FrameSinkId to Children (Closed)
Patch Set: Addressed Antoine's comment Created 3 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
« no previous file with comments | « ui/aura/mus/mus_context_factory.h ('k') | ui/aura/mus/window_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/mus_context_factory.cc
diff --git a/ui/aura/mus/mus_context_factory.cc b/ui/aura/mus/mus_context_factory.cc
index 6a099290099ae219480c4a97d669c738448d8cfd..be536b8821c34bae64e161853c9f7a629fc06daa 100644
--- a/ui/aura/mus/mus_context_factory.cc
+++ b/ui/aura/mus/mus_context_factory.cc
@@ -26,9 +26,18 @@ void MusContextFactory::OnEstablishedGpuChannel(
WindowTreeHost::GetForAcceleratedWidget(compositor->widget());
WindowPortMus* window_port = WindowPortMus::Get(host->window());
DCHECK(window_port);
- auto compositor_frame_sink = window_port->RequestCompositorFrameSink(
+ window_port->RequestCompositorFrameSink(
gpu_->CreateContextProvider(std::move(gpu_channel)),
- gpu_->gpu_memory_buffer_manager());
+ gpu_->gpu_memory_buffer_manager(),
+ base::Bind(&MusContextFactory::OnCompositorFrameSinkAvailable,
+ weak_ptr_factory_.GetWeakPtr(), compositor));
+}
+
+void MusContextFactory::OnCompositorFrameSinkAvailable(
+ base::WeakPtr<ui::Compositor> compositor,
+ std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink) {
+ if (!compositor)
+ return;
compositor->SetCompositorFrameSink(std::move(compositor_frame_sink));
}
« no previous file with comments | « ui/aura/mus/mus_context_factory.h ('k') | ui/aura/mus/window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698