Chromium Code Reviews| Index: cc/trees/single_thread_proxy.cc |
| diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc |
| index 9a134578b623475bddf269782564f035ca466ff0..30be67788ba167b922890a854105a745445a2e8d 100644 |
| --- a/cc/trees/single_thread_proxy.cc |
| +++ b/cc/trees/single_thread_proxy.cc |
| @@ -90,6 +90,8 @@ 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, |
| scheduler_settings, |
| @@ -425,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 |
|
danakj
2014/12/04 22:22:10
nit: |commit_blocking_task_runner_|
|
| + // commit/activation before CommitComplete. |
| + CommitComplete(); |
| } |
| timing_history_.DidActivateSyncTree(); |