summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorweiliangc <weiliangc@chromium.org>2014-12-04 17:54:13 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-05 01:54:42 +0000
commitb821b71ff0166e250ae4b30b56c1b7b6d3bd5db6 (patch)
tree6cda55c677deb4faa679d0ebb88c5f0601113a1c /cc
parentf291de7eecd98906f061afac01c5a474d48a9ac5 (diff)
downloadchromium_src-b821b71ff0166e250ae4b30b56c1b7b6d3bd5db6.zip
chromium_src-b821b71ff0166e250ae4b30b56c1b7b6d3bd5db6.tar.gz
chromium_src-b821b71ff0166e250ae4b30b56c1b7b6d3bd5db6.tar.bz2
Make ui::Compositor use ui::Scheduler
Taken from enne's CL 535733002 and rebased. It has been taken out of CL 134623005. BUG=329552 Committed: https://crrev.com/36b7fc7f8b05ea627873e58a162c1c26784e472d Cr-Commit-Position: refs/heads/master@{#298779} Review URL: https://codereview.chromium.org/638653003 Cr-Commit-Position: refs/heads/master@{#306954}
Diffstat (limited to 'cc')
-rw-r--r--cc/trees/single_thread_proxy.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index dfce808..56d244c 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -90,6 +90,7 @@ void SingleThreadProxy::SetLayerTreeHostClientReady() {
if (layer_tree_host_->settings().single_thread_proxy_scheduler &&
!scheduler_on_impl_thread_) {
SchedulerSettings scheduler_settings(layer_tree_host_->settings());
+ // SingleThreadProxy should run in main thread low latency mode.
scheduler_settings.main_thread_should_always_be_low_latency = true;
scheduler_on_impl_thread_ =
Scheduler::Create(this,
@@ -426,13 +427,10 @@ void SingleThreadProxy::DidActivateSyncTree() {
// the pending tree is not actually ready in the SingleThreadProxy.
layer_tree_host_impl_->SetRequiresHighResToDraw();
- // Since activation could cause tasks to run, post CommitComplete
- // separately so that it runs after these tasks. This is the loose
- // equivalent of blocking commit until activation and also running
- // all tasks posted during commit/activation before CommitComplete.
- MainThreadTaskRunner()->PostTask(
- FROM_HERE, base::Bind(&SingleThreadProxy::CommitComplete,
- weak_factory_.GetWeakPtr()));
+ // Synchronously call to CommitComplete. Resetting
+ // |commit_blocking_task_runner| would make sure all tasks posted during
+ // commit/activation before CommitComplete.
+ CommitComplete();
}
timing_history_.DidActivateSyncTree();