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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 2648583005: [wip] hack to use synthetic bfs for browser compositor (Closed)
Patch Set: Created 3 years, 11 months 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 | « cc/trees/single_thread_proxy.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index f30413a15aeae9f665325a75e8101f5efcceb1ad..10fd224f89dc461c181d319796ff43b6f9eaafd0 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -416,8 +416,15 @@ void SingleThreadProxy::DidLoseCompositorFrameSinkOnImplThread() {
}
void SingleThreadProxy::SetBeginFrameSource(BeginFrameSource* source) {
- if (scheduler_on_impl_thread_)
- scheduler_on_impl_thread_->SetBeginFrameSource(source);
+ if (!synthetic_begin_frame_source_) {
+ synthetic_begin_frame_source_.reset(
+ new DelayBasedBeginFrameSource(base::MakeUnique<DelayBasedTimeSource>(
+ task_runner_provider_->MainThreadTaskRunner())));
+ }
+ if (scheduler_on_impl_thread_) {
+ scheduler_on_impl_thread_->SetBeginFrameSource(
+ synthetic_begin_frame_source_.get());
+ }
}
void SingleThreadProxy::DidReceiveCompositorFrameAckOnImplThread() {
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698