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

Unified Diff: ui/aura/mus/window_compositor_frame_sink.cc

Issue 2474113002: Mus+Ash: Unified BeginFrame Skeleton (Closed)
Patch Set: Rebase 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 | « ui/aura/mus/window_compositor_frame_sink.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_compositor_frame_sink.cc
diff --git a/ui/aura/mus/window_compositor_frame_sink.cc b/ui/aura/mus/window_compositor_frame_sink.cc
index cab7789454ce9220443316fe66dd1e17b1a8bf1c..1490457984d89ace1218ba6eede5a6ce22928b8c 100644
--- a/ui/aura/mus/window_compositor_frame_sink.cc
+++ b/ui/aura/mus/window_compositor_frame_sink.cc
@@ -45,10 +45,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;
@@ -91,6 +88,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_);
@@ -100,6 +102,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 | « ui/aura/mus/window_compositor_frame_sink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698