Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: services/ui/public/cpp/window_compositor_frame_sink.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | services/ui/public/cpp/window_tree_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
+ 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(
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | services/ui/public/cpp/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698