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..7d3c661899b4b12d26206e17103b3eee3fc26519 100644 |
| --- a/cc/surfaces/direct_compositor_frame_sink.cc |
| +++ b/cc/surfaces/direct_compositor_frame_sink.cc |
| @@ -67,14 +67,18 @@ bool DirectCompositorFrameSink::BindToClient( |
| if (auto* cp = context_provider()) |
| cp->SetLostContextCallback(base::Closure()); |
| + constexpr bool submits_to_display_compositor = true; |
| 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, |
| + submits_to_display_compositor); |
| begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this); |
| client_->SetBeginFrameSource(begin_frame_source_.get()); |
| + |
| // Avoid initializing GL context here, as this should be sharing the |
| // Display's context. |
|
xlai (Olivia)
2017/02/08 21:48:35
Add DCHECK(display_);
Alex Z.
2017/02/08 21:58:09
Done.
|
| + display_->Initialize(this, surface_manager_); |
| return true; |
| } |
| @@ -92,6 +96,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_, |
| + frame.metadata.device_scale_factor); |
| support_->SubmitCompositorFrame(delegated_local_surface_id_, |
| std::move(frame)); |
| } |