Chromium Code Reviews| Index: cc/surfaces/direct_compositor_frame_sink.cc |
| diff --git a/cc/surfaces/direct_compositor_frame_sink.cc b/cc/surfaces/direct_compositor_frame_sink.cc |
| index 10c37ee7cc3842ae45d3b48987aead9a936d9612..1f3bcc00c894a952a2f824b779bea9e1d73ec8ad 100644 |
| --- a/cc/surfaces/direct_compositor_frame_sink.cc |
| +++ b/cc/surfaces/direct_compositor_frame_sink.cc |
| @@ -9,6 +9,7 @@ |
| #include "cc/output/compositor_frame_sink_client.h" |
| #include "cc/surfaces/display.h" |
| #include "cc/surfaces/frame_sink_id.h" |
| +#include "cc/surfaces/framesink_manager.h" |
| #include "cc/surfaces/surface.h" |
| #include "cc/surfaces/surface_id_allocator.h" |
| #include "cc/surfaces/surface_manager.h" |
| @@ -18,6 +19,7 @@ namespace cc { |
| DirectCompositorFrameSink::DirectCompositorFrameSink( |
| const FrameSinkId& frame_sink_id, |
| SurfaceManager* surface_manager, |
| + FrameSinkManager* framesink_manager, |
| Display* display, |
| scoped_refptr<ContextProvider> context_provider, |
| scoped_refptr<ContextProvider> worker_context_provider, |
| @@ -29,6 +31,7 @@ DirectCompositorFrameSink::DirectCompositorFrameSink( |
| shared_bitmap_manager), |
| frame_sink_id_(frame_sink_id), |
| surface_manager_(surface_manager), |
| + framesink_manager_(framesink_manager), |
| display_(display), |
| factory_(frame_sink_id, surface_manager, this) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -42,11 +45,13 @@ DirectCompositorFrameSink::DirectCompositorFrameSink( |
| DirectCompositorFrameSink::DirectCompositorFrameSink( |
| const FrameSinkId& frame_sink_id, |
| SurfaceManager* surface_manager, |
| + FrameSinkManager* framesink_manager, |
| Display* display, |
| scoped_refptr<VulkanContextProvider> vulkan_context_provider) |
| : CompositorFrameSink(std::move(vulkan_context_provider)), |
| frame_sink_id_(frame_sink_id), |
| surface_manager_(surface_manager), |
| + framesink_manager_(framesink_manager), |
| display_(display), |
| factory_(frame_sink_id_, surface_manager, this) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -64,7 +69,7 @@ bool DirectCompositorFrameSink::BindToClient( |
| if (!CompositorFrameSink::BindToClient(client)) |
| return false; |
| - surface_manager_->RegisterSurfaceFactoryClient(frame_sink_id_, this); |
| + framesink_manager_->RegisterSurfaceFactoryClient(frame_sink_id_, this); |
| // We want the Display's output surface to hear about lost context, and since |
| // this shares a context with it, we should not be listening for lost context |
| @@ -74,14 +79,14 @@ bool DirectCompositorFrameSink::BindToClient( |
| // Avoid initializing GL context here, as this should be sharing the |
| // Display's context. |
| - display_->Initialize(this, surface_manager_); |
| + display_->Initialize(this, surface_manager_, framesink_manager_); |
|
Fady Samuel
2017/02/12 19:04:07
Does Display do anything useful with SurfaceManage
k.devara
2017/02/13 06:47:34
surface_manager itself is used to get surface_id f
|
| return true; |
| } |
| void DirectCompositorFrameSink::DetachFromClient() { |
| // Unregister the SurfaceFactoryClient here instead of the dtor so that only |
| // one client is alive for this namespace at any given time. |
| - surface_manager_->UnregisterSurfaceFactoryClient(frame_sink_id_); |
| + framesink_manager_->UnregisterSurfaceFactoryClient(frame_sink_id_); |
| factory_.EvictSurface(); |
| CompositorFrameSink::DetachFromClient(); |