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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 : nullptr; | 45 : nullptr; |
46 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( | 46 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( |
47 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); | 47 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); |
48 client_->SetLayerTreeHost(this); | 48 client_->SetLayerTreeHost(this); |
49 } | 49 } |
50 | 50 |
51 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 51 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
52 FakeLayerTreeHostClient* client, | 52 FakeLayerTreeHostClient* client, |
53 TestTaskGraphRunner* task_graph_runner) { | 53 TestTaskGraphRunner* task_graph_runner) { |
54 LayerTreeSettings settings; | 54 LayerTreeSettings settings; |
55 settings.verify_transform_tree_calculations = true; | |
56 settings.verify_clip_tree_calculations = true; | 55 settings.verify_clip_tree_calculations = true; |
57 return Create(client, task_graph_runner, settings); | 56 return Create(client, task_graph_runner, settings); |
58 } | 57 } |
59 | 58 |
60 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 59 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
61 FakeLayerTreeHostClient* client, | 60 FakeLayerTreeHostClient* client, |
62 TestTaskGraphRunner* task_graph_runner, | 61 TestTaskGraphRunner* task_graph_runner, |
63 const LayerTreeSettings& settings) { | 62 const LayerTreeSettings& settings) { |
64 return Create(client, task_graph_runner, settings, | 63 return Create(client, task_graph_runner, settings, |
65 CompositorMode::SINGLE_THREADED); | 64 CompositorMode::SINGLE_THREADED); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 pending_tree()->SetPropertyTrees(property_trees()); | 129 pending_tree()->SetPropertyTrees(property_trees()); |
131 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), | 130 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), |
132 pending_tree()); | 131 pending_tree()); |
133 layer_tree_->animation_host()->PushPropertiesTo(host_impl_.animation_host()); | 132 layer_tree_->animation_host()->PushPropertiesTo(host_impl_.animation_host()); |
134 | 133 |
135 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); | 134 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); |
136 return pending_tree()->root_layer_for_testing(); | 135 return pending_tree()->root_layer_for_testing(); |
137 } | 136 } |
138 | 137 |
139 } // namespace cc | 138 } // namespace cc |
OLD | NEW |