Chromium Code Reviews| Index: cc/trees/layer_tree_host_in_process.cc |
| diff --git a/cc/trees/layer_tree_host_in_process.cc b/cc/trees/layer_tree_host_in_process.cc |
| index 57e2ea414e8bda672595b1955847274a3fc862d6..f4cd7c488f793a398d2615f6ef25361f0c6b124e 100644 |
| --- a/cc/trees/layer_tree_host_in_process.cc |
| +++ b/cc/trees/layer_tree_host_in_process.cc |
| @@ -421,12 +421,13 @@ void LayerTreeHostInProcess::RequestMainFrameUpdate() { |
| // this function, keep in mind that the function *runs* on the impl thread! Any |
| // code that is logically a main thread operation, e.g. deletion of a Layer, |
| // should be delayed until the LayerTreeHostInProcess::CommitComplete, which |
| -// will run |
| -// after the commit, but on the main thread. |
| +// will run after the commit, but on the main thread. |
| void LayerTreeHostInProcess::FinishCommitOnImplThread( |
| LayerTreeHostImpl* host_impl) { |
| DCHECK(!IsRemoteServer()); |
| - DCHECK(task_runner_provider_->IsImplThread()); |
| + // The function may also be called by single threaded unit test. |
| + DCHECK(task_runner_provider_->IsImplThread() || |
| + !task_runner_provider_->ImplThreadTaskRunner()); |
|
ajuma
2016/10/07 18:38:30
Instead of calling this directly from your test, c
|
| bool is_new_trace; |
| TRACE_EVENT_IS_NEW_TRACE(&is_new_trace); |
| @@ -478,6 +479,10 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread( |
| TreeSynchronizer::PushLayerProperties(layer_tree_.get(), sync_tree); |
| + // This must happen after synchronizing property trees and after pushing |
| + // properties, which updates the clobber_active_value flag. |
| + sync_tree->UpdatePropertyTreeScrollOffset(layer_tree_->property_trees()); |
| + |
| // This must happen after synchronizing property trees and after push |
| // properties, which updates property tree indices, but before animation |
| // host pushes properties as animation host push properties can change |
| @@ -491,10 +496,6 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread( |
| host_impl->animation_host()); |
| } |
| - // This must happen after synchronizing property trees and after pushing |
| - // properties, which updates the clobber_active_value flag. |
| - sync_tree->UpdatePropertyTreeScrollOffset(layer_tree_->property_trees()); |
| - |
| micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl); |
| layer_tree_->property_trees()->ResetAllChangeTracking(); |
| } |