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 1fa4d8d150a4ebf01d2b1cd59053a630aedf1842..68eae9579449bfe81c3450c54ef1b2d45a1d2aca 100644 |
| --- a/cc/surfaces/direct_compositor_frame_sink.cc |
| +++ b/cc/surfaces/direct_compositor_frame_sink.cc |
| @@ -68,13 +68,15 @@ bool DirectCompositorFrameSink::BindToClient( |
| cp->SetLostContextCallback(base::Closure()); |
| support_ = base::MakeUnique<CompositorFrameSinkSupport>( |
| - this, surface_manager_, frame_sink_id_, display_, false, |
| - capabilities_.delegated_sync_points_required); |
| + this, surface_manager_, frame_sink_id_, false, |
| + capabilities_.delegated_sync_points_required, true /* has_display */); |
|
danakj
2017/02/08 19:23:38
nit: here you could use a temp bool var to give th
Alex Z.
2017/02/08 21:26:47
Done.
|
| begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this); |
| client_->SetBeginFrameSource(begin_frame_source_.get()); |
| + |
| // Avoid initializing GL context here, as this should be sharing the |
|
xlai (Olivia)
2017/02/08 20:11:34
Display::Initialize may initialize the GLRenderer
Alex Z.
2017/02/08 21:26:47
It is.
Most changes in this file are to restore th
|
| // Display's context. |
| + display_->Initialize(this, surface_manager_); |
|
xlai (Olivia)
2017/02/08 20:11:34
DCHECK(display_) ?
|
| return true; |
| } |
| @@ -92,6 +94,8 @@ void DirectCompositorFrameSink::SubmitCompositorFrame(CompositorFrame frame) { |
| delegated_local_surface_id_ = surface_id_allocator_.GenerateId(); |
| last_swap_frame_size_ = frame_size; |
| } |
| + display_->SetLocalSurfaceId(delegated_local_surface_id_, |
|
xlai (Olivia)
2017/02/08 20:11:34
DCHECK(display_) ?
|
| + frame.metadata.device_scale_factor); |
| support_->SubmitCompositorFrame(delegated_local_surface_id_, |
| std::move(frame)); |
| } |