| Index: services/ui/surfaces/display_compositor.cc
|
| diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
|
| index 4603eacc0d549f2bb7da3ca64310a9519d663ecf..04db575df31879e85ca710eece2bc21ded573757 100644
|
| --- a/services/ui/surfaces/display_compositor.cc
|
| +++ b/services/ui/surfaces/display_compositor.cc
|
| @@ -29,13 +29,14 @@ DisplayCompositor::DisplayCompositor(
|
| gfx::AcceleratedWidget widget,
|
| scoped_refptr<gpu::GpuChannelHost> gpu_channel,
|
| const scoped_refptr<SurfacesState>& surfaces_state)
|
| - : task_runner_(task_runner),
|
| + : frame_sink_id_(surfaces_state->next_client_id(), 0),
|
| + task_runner_(task_runner),
|
| surfaces_state_(surfaces_state),
|
| - factory_(surfaces_state->manager(), this),
|
| - allocator_(cc::FrameSinkId(surfaces_state->next_client_id(), 0)) {
|
| - surfaces_state_->manager()->RegisterFrameSinkId(allocator_.frame_sink_id());
|
| - surfaces_state_->manager()->RegisterSurfaceFactoryClient(
|
| - allocator_.frame_sink_id(), this);
|
| + allocator_(frame_sink_id_),
|
| + factory_(frame_sink_id_, surfaces_state->manager(), this) {
|
| + surfaces_state_->manager()->RegisterFrameSinkId(frame_sink_id_);
|
| + surfaces_state_->manager()->RegisterSurfaceFactoryClient(frame_sink_id_,
|
| + this);
|
|
|
| gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager =
|
| gpu_channel->gpu_memory_buffer_manager();
|
| @@ -75,15 +76,13 @@ DisplayCompositor::DisplayCompositor(
|
| cc::RendererSettings(), std::move(synthetic_begin_frame_source),
|
| std::move(display_output_surface), std::move(scheduler),
|
| base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())));
|
| - display_->Initialize(this, surfaces_state_->manager(),
|
| - allocator_.frame_sink_id());
|
| + display_->Initialize(this, surfaces_state_->manager(), frame_sink_id_);
|
| display_->SetVisible(true);
|
| }
|
|
|
| DisplayCompositor::~DisplayCompositor() {
|
| - surfaces_state_->manager()->UnregisterSurfaceFactoryClient(
|
| - allocator_.frame_sink_id());
|
| - surfaces_state_->manager()->InvalidateFrameSinkId(allocator_.frame_sink_id());
|
| + surfaces_state_->manager()->UnregisterSurfaceFactoryClient(frame_sink_id_);
|
| + surfaces_state_->manager()->InvalidateFrameSinkId(frame_sink_id_);
|
| }
|
|
|
| void DisplayCompositor::SubmitCompositorFrame(
|
|
|