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

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

Issue 2886873002: Only send the FrameSinkId to client when it is necessary (Closed)
Patch Set: Address review issues. Created 3 years, 7 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_port_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 71698063c0639e72494947b2103a2a4bd99dbcfc..a3e89739f752363b72e1dfe9b2de5c703b5c1b94 100644
--- a/ui/aura/mus/mus_context_factory.cc
+++ b/ui/aura/mus/mus_context_factory.cc
@@ -38,18 +38,10 @@ void MusContextFactory::OnEstablishedGpuChannel(
WindowTreeHost::GetForAcceleratedWidget(compositor->widget());
WindowPortMus* window_port = WindowPortMus::Get(host->window());
DCHECK(window_port);
- window_port->RequestCompositorFrameSink(
- gpu_->CreateContextProvider(std::move(gpu_channel)),
- 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;
+ std::unique_ptr<cc::CompositorFrameSink> compositor_frame_sink =
+ window_port->RequestCompositorFrameSink(
+ gpu_->CreateContextProvider(std::move(gpu_channel)),
+ gpu_->gpu_memory_buffer_manager());
compositor->SetCompositorFrameSink(std::move(compositor_frame_sink));
}
« no previous file with comments | « ui/aura/mus/mus_context_factory.h ('k') | ui/aura/mus/window_port_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698