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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 FakeLayerTreeHostClient* client, | 68 FakeLayerTreeHostClient* client, |
69 TestTaskGraphRunner* task_graph_runner, | 69 TestTaskGraphRunner* task_graph_runner, |
70 MutatorHost* mutator_host, | 70 MutatorHost* mutator_host, |
71 const LayerTreeSettings& settings, | 71 const LayerTreeSettings& settings, |
72 CompositorMode mode) { | 72 CompositorMode mode) { |
73 LayerTreeHostInProcess::InitParams params; | 73 LayerTreeHostInProcess::InitParams params; |
74 params.client = client; | 74 params.client = client; |
75 params.settings = &settings; | 75 params.settings = &settings; |
76 params.task_graph_runner = task_graph_runner; | 76 params.task_graph_runner = task_graph_runner; |
77 params.mutator_host = mutator_host; | 77 params.mutator_host = mutator_host; |
| 78 params.image_worker_task_runner = nullptr; |
78 return base::WrapUnique(new FakeLayerTreeHost(client, ¶ms, mode)); | 79 return base::WrapUnique(new FakeLayerTreeHost(client, ¶ms, mode)); |
79 } | 80 } |
80 | 81 |
81 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 82 std::unique_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
82 FakeLayerTreeHostClient* client, | 83 FakeLayerTreeHostClient* client, |
83 TestTaskGraphRunner* task_graph_runner, | 84 TestTaskGraphRunner* task_graph_runner, |
84 MutatorHost* mutator_host, | 85 MutatorHost* mutator_host, |
85 const LayerTreeSettings& settings, | 86 const LayerTreeSettings& settings, |
86 CompositorMode mode, | 87 CompositorMode mode, |
87 ImageSerializationProcessor* image_serialization_processor) { | 88 ImageSerializationProcessor* image_serialization_processor) { |
88 LayerTreeHostInProcess::InitParams params; | 89 LayerTreeHostInProcess::InitParams params; |
89 params.client = client; | 90 params.client = client; |
90 params.settings = &settings; | 91 params.settings = &settings; |
91 params.task_graph_runner = task_graph_runner; | 92 params.task_graph_runner = task_graph_runner; |
92 params.image_serialization_processor = image_serialization_processor; | 93 params.image_serialization_processor = image_serialization_processor; |
93 params.mutator_host = mutator_host; | 94 params.mutator_host = mutator_host; |
| 95 params.image_worker_task_runner = nullptr; |
94 return base::WrapUnique(new FakeLayerTreeHost(client, ¶ms, mode)); | 96 return base::WrapUnique(new FakeLayerTreeHost(client, ¶ms, mode)); |
95 } | 97 } |
96 | 98 |
97 FakeLayerTreeHost::~FakeLayerTreeHost() { | 99 FakeLayerTreeHost::~FakeLayerTreeHost() { |
98 client_->SetLayerTreeHost(NULL); | 100 client_->SetLayerTreeHost(NULL); |
99 } | 101 } |
100 | 102 |
101 void FakeLayerTreeHost::SetNeedsCommit() { needs_commit_ = true; } | 103 void FakeLayerTreeHost::SetNeedsCommit() { needs_commit_ = true; } |
102 | 104 |
103 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { | 105 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { |
(...skipping 27 matching lines...) Expand all Loading... |
131 pending_tree()->SetPropertyTrees(property_trees()); | 133 pending_tree()->SetPropertyTrees(property_trees()); |
132 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), | 134 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), |
133 pending_tree()); | 135 pending_tree()); |
134 layer_tree_->mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); | 136 layer_tree_->mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); |
135 | 137 |
136 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); | 138 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); |
137 return pending_tree()->root_layer_for_testing(); | 139 return pending_tree()->root_layer_for_testing(); |
138 } | 140 } |
139 | 141 |
140 } // namespace cc | 142 } // namespace cc |
OLD | NEW |