Chromium Code Reviews| Index: services/ui/public/cpp/window_compositor_frame_sink.cc |
| diff --git a/services/ui/public/cpp/window_compositor_frame_sink.cc b/services/ui/public/cpp/window_compositor_frame_sink.cc |
| index 9cd9e2803cb281bb461a750d0ff96b4b31191722..62f4a595ae14be0b81633da12f6383ac49ebbe3d 100644 |
| --- a/services/ui/public/cpp/window_compositor_frame_sink.cc |
| +++ b/services/ui/public/cpp/window_compositor_frame_sink.cc |
| @@ -47,10 +47,7 @@ bool WindowCompositorFrameSink::BindToClient( |
| new mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient>( |
| this, std::move(client_request_))); |
| - // TODO(enne): Get this from the WindowSurface via ServerWindowSurface. |
| - begin_frame_source_.reset(new cc::DelayBasedBeginFrameSource( |
| - base::MakeUnique<cc::DelayBasedTimeSource>( |
| - base::ThreadTaskRunnerHandle::Get().get()))); |
| + begin_frame_source_ = base::MakeUnique<cc::ExternalBeginFrameSource>(this); |
| client->SetBeginFrameSource(begin_frame_source_.get()); |
| return true; |
| @@ -93,6 +90,11 @@ void WindowCompositorFrameSink::DidReceiveCompositorFrameAck() { |
| client_->DidReceiveCompositorFrameAck(); |
| } |
| +void WindowCompositorFrameSink::OnBeginFrame( |
|
rjkroege
2016/11/05 00:59:50
this is client library code? How does change with
Fady Samuel
2016/11/05 11:56:03
We have two copies of this code. I updated both.
|
| + const cc::BeginFrameArgs& begin_frame_args) { |
| + begin_frame_source_->OnBeginFrame(begin_frame_args); |
| +} |
| + |
| void WindowCompositorFrameSink::ReclaimResources( |
| const cc::ReturnedResourceArray& resources) { |
| DCHECK(thread_checker_); |
| @@ -102,6 +104,10 @@ void WindowCompositorFrameSink::ReclaimResources( |
| client_->ReclaimResources(resources); |
| } |
| +void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) { |
| + compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames); |
| +} |
| + |
| WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {} |
| WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding( |