| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/test/fake_layer_tree_host.h" | 5 #include "cc/test/fake_layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/animation/animation_host.h" | 8 #include "cc/animation/animation_host.h" |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/test/fake_image_serialization_processor.h" | 10 #include "cc/test/fake_image_serialization_processor.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 LayerTreeHostInProcess::InitParams* params, | 30 LayerTreeHostInProcess::InitParams* params, |
| 31 CompositorMode mode) | 31 CompositorMode mode) |
| 32 : LayerTreeHostInProcess( | 32 : LayerTreeHostInProcess( |
| 33 params, | 33 params, |
| 34 mode, | 34 mode, |
| 35 base::MakeUnique<FakeLayerTree>(std::move(params->animation_host), | 35 base::MakeUnique<FakeLayerTree>(std::move(params->animation_host), |
| 36 this)), | 36 this)), |
| 37 client_(client), | 37 client_(client), |
| 38 host_impl_(*params->settings, | 38 host_impl_(*params->settings, |
| 39 &task_runner_provider_, | 39 &task_runner_provider_, |
| 40 &manager_, | |
| 41 params->task_graph_runner), | 40 params->task_graph_runner), |
| 42 needs_commit_(false) { | 41 needs_commit_(false) { |
| 43 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner = | 42 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner = |
| 44 mode == CompositorMode::THREADED ? base::ThreadTaskRunnerHandle::Get() | 43 mode == CompositorMode::THREADED ? base::ThreadTaskRunnerHandle::Get() |
| 45 : nullptr; | 44 : nullptr; |
| 46 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( | 45 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( |
| 47 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); | 46 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); |
| 48 client_->SetLayerTreeHost(this); | 47 client_->SetLayerTreeHost(this); |
| 49 } | 48 } |
| 50 | 49 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 pending_tree()->SetPropertyTrees(property_trees()); | 128 pending_tree()->SetPropertyTrees(property_trees()); |
| 130 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), | 129 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), |
| 131 pending_tree()); | 130 pending_tree()); |
| 132 layer_tree_->animation_host()->PushPropertiesTo(host_impl_.animation_host()); | 131 layer_tree_->animation_host()->PushPropertiesTo(host_impl_.animation_host()); |
| 133 | 132 |
| 134 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); | 133 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); |
| 135 return pending_tree()->root_layer_for_testing(); | 134 return pending_tree()->root_layer_for_testing(); |
| 136 } | 135 } |
| 137 | 136 |
| 138 } // namespace cc | 137 } // namespace cc |
| OLD | NEW |