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 "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( | 44 SetTaskRunnerProviderForTesting(TaskRunnerProvider::Create( |
45 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); | 45 base::ThreadTaskRunnerHandle::Get(), impl_task_runner)); |
46 client_->SetLayerTreeHost(this); | 46 client_->SetLayerTreeHost(this); |
47 } | 47 } |
48 | 48 |
49 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 49 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
50 FakeLayerTreeHostClient* client, | 50 FakeLayerTreeHostClient* client, |
51 TestTaskGraphRunner* task_graph_runner, | 51 TestTaskGraphRunner* task_graph_runner, |
52 MutatorHost* mutator_host) { | 52 MutatorHost* mutator_host) { |
53 LayerTreeSettings settings; | 53 LayerTreeSettings settings; |
54 settings.verify_clip_tree_calculations = true; | |
55 return Create(client, task_graph_runner, mutator_host, settings); | 54 return Create(client, task_graph_runner, mutator_host, settings); |
56 } | 55 } |
57 | 56 |
58 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 57 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
59 FakeLayerTreeHostClient* client, | 58 FakeLayerTreeHostClient* client, |
60 TestTaskGraphRunner* task_graph_runner, | 59 TestTaskGraphRunner* task_graph_runner, |
61 MutatorHost* mutator_host, | 60 MutatorHost* mutator_host, |
62 const LayerTreeSettings& settings) { | 61 const LayerTreeSettings& settings) { |
63 return Create(client, task_graph_runner, mutator_host, settings, | 62 return Create(client, task_graph_runner, mutator_host, settings, |
64 CompositorMode::SINGLE_THREADED); | 63 CompositorMode::SINGLE_THREADED); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), | 116 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), |
118 pending_tree()); | 117 pending_tree()); |
119 layer_tree_->mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); | 118 layer_tree_->mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); |
120 | 119 |
121 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( | 120 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( |
122 property_trees(), pending_tree()); | 121 property_trees(), pending_tree()); |
123 return pending_tree()->root_layer_for_testing(); | 122 return pending_tree()->root_layer_for_testing(); |
124 } | 123 } |
125 | 124 |
126 } // namespace cc | 125 } // namespace cc |
OLD | NEW |