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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 1520623003: cc:: Change plumbing for external_begin_frame_source to the Scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing include. Created 5 years 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') | no next file » | 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 c8e5829b22f1538d43c0c2f9c7db751f07a7d87a..cb669abdf10791e58bc64293a704c216fe8a2bb2 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -25,22 +25,17 @@ namespace cc {
scoped_ptr<Proxy> SingleThreadProxy::Create(
LayerTreeHost* layer_tree_host,
LayerTreeHostSingleThreadClient* client,
- TaskRunnerProvider* task_runner_provider,
- scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+ TaskRunnerProvider* task_runner_provider) {
return make_scoped_ptr(
- new SingleThreadProxy(layer_tree_host, client, task_runner_provider,
- std::move(external_begin_frame_source)));
+ new SingleThreadProxy(layer_tree_host, client, task_runner_provider));
}
-SingleThreadProxy::SingleThreadProxy(
- LayerTreeHost* layer_tree_host,
- LayerTreeHostSingleThreadClient* client,
- TaskRunnerProvider* task_runner_provider,
- scoped_ptr<BeginFrameSource> external_begin_frame_source)
+SingleThreadProxy::SingleThreadProxy(LayerTreeHost* layer_tree_host,
+ LayerTreeHostSingleThreadClient* client,
+ TaskRunnerProvider* task_runner_provider)
: layer_tree_host_(layer_tree_host),
client_(client),
task_runner_provider_(task_runner_provider),
- external_begin_frame_source_(std::move(external_begin_frame_source)),
next_frame_is_newly_committed_frame_(false),
#if DCHECK_IS_ON()
inside_impl_frame_(false),
@@ -56,17 +51,23 @@ SingleThreadProxy::SingleThreadProxy(
DCHECK(task_runner_provider_);
DCHECK(task_runner_provider_->IsMainThread());
DCHECK(layer_tree_host);
+}
- if (layer_tree_host->settings().single_thread_proxy_scheduler &&
+void SingleThreadProxy::Start(
+ scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+ DebugScopedSetImplThread impl(task_runner_provider_);
+ external_begin_frame_source_ = std::move(external_begin_frame_source);
+
+ if (layer_tree_host_->settings().single_thread_proxy_scheduler &&
!scheduler_on_impl_thread_) {
SchedulerSettings scheduler_settings(
- layer_tree_host->settings().ToSchedulerSettings());
+ layer_tree_host_->settings().ToSchedulerSettings());
scheduler_settings.commit_to_active_tree = CommitToActiveTree();
scoped_ptr<CompositorTimingHistory> compositor_timing_history(
new CompositorTimingHistory(
CompositorTimingHistory::BROWSER_UMA,
- layer_tree_host->rendering_stats_instrumentation()));
+ layer_tree_host_->rendering_stats_instrumentation()));
scheduler_on_impl_thread_ =
Scheduler::Create(this, scheduler_settings, layer_tree_host_->id(),
@@ -74,10 +75,7 @@ SingleThreadProxy::SingleThreadProxy(
external_begin_frame_source_.get(),
std::move(compositor_timing_history));
}
-}
-void SingleThreadProxy::Start() {
- DebugScopedSetImplThread impl(task_runner_provider_);
layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
}
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698