| 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 15 matching lines...) Expand all Loading... |
| 26 mode == CompositorMode::THREADED ? base::ThreadTaskRunnerHandle::Get() | 26 mode == CompositorMode::THREADED ? base::ThreadTaskRunnerHandle::Get() |
| 27 : nullptr; | 27 : nullptr; |
| 28 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( | 28 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( |
| 29 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); | 29 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); |
| 30 client_->SetLayerTreeHost(this); | 30 client_->SetLayerTreeHost(this); |
| 31 } | 31 } |
| 32 | 32 |
| 33 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 33 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
| 34 FakeLayerTreeHostClient* client, | 34 FakeLayerTreeHostClient* client, |
| 35 TestTaskGraphRunner* task_graph_runner) { | 35 TestTaskGraphRunner* task_graph_runner) { |
| 36 return Create(client, task_graph_runner, LayerTreeSettings()); | 36 LayerTreeSettings settings; |
| 37 settings.verify_transform_tree_calculations = true; |
| 38 return Create(client, task_graph_runner, settings); |
| 37 } | 39 } |
| 38 | 40 |
| 39 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 41 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
| 40 FakeLayerTreeHostClient* client, | 42 FakeLayerTreeHostClient* client, |
| 41 TestTaskGraphRunner* task_graph_runner, | 43 TestTaskGraphRunner* task_graph_runner, |
| 42 const LayerTreeSettings& settings) { | 44 const LayerTreeSettings& settings) { |
| 43 return Create(client, task_graph_runner, settings, | 45 return Create(client, task_graph_runner, settings, |
| 44 CompositorMode::SINGLE_THREADED); | 46 CompositorMode::SINGLE_THREADED); |
| 45 } | 47 } |
| 46 | 48 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 pending_tree()->SetPropertyTrees(property_trees()); | 113 pending_tree()->SetPropertyTrees(property_trees()); |
| 112 TreeSynchronizer::PushLayerProperties(root_layer()->layer_tree_host(), | 114 TreeSynchronizer::PushLayerProperties(root_layer()->layer_tree_host(), |
| 113 pending_tree()); | 115 pending_tree()); |
| 114 animation_host()->PushPropertiesTo(host_impl_.animation_host()); | 116 animation_host()->PushPropertiesTo(host_impl_.animation_host()); |
| 115 | 117 |
| 116 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); | 118 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); |
| 117 return pending_tree()->root_layer_for_testing(); | 119 return pending_tree()->root_layer_for_testing(); |
| 118 } | 120 } |
| 119 | 121 |
| 120 } // namespace cc | 122 } // namespace cc |
| OLD | NEW |