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 namespace cc { | 7 namespace cc { |
8 FakeLayerTreeHost::FakeLayerTreeHost(FakeLayerTreeHostClient* client, | 8 FakeLayerTreeHost::FakeLayerTreeHost(FakeLayerTreeHostClient* client, |
9 LayerTreeHost::InitParams* params) | 9 LayerTreeHost::InitParams* params) |
10 : LayerTreeHost(params), | 10 : LayerTreeHost(params), |
11 client_(client), | 11 client_(client), |
12 host_impl_(*params->settings, &proxy_, &manager_, nullptr), | 12 host_impl_(*params->settings, &proxy_, &manager_, nullptr), |
13 needs_commit_(false) { | 13 needs_commit_(false) { |
14 client_->SetLayerTreeHost(this); | 14 client_->SetLayerTreeHost(this); |
15 } | 15 } |
16 | 16 |
17 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 17 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
18 FakeLayerTreeHostClient* client) { | 18 FakeLayerTreeHostClient* client) { |
19 LayerTreeSettings settings; | 19 LayerTreeSettings settings; |
20 settings.verify_property_trees = true; | |
21 return Create(client, settings); | 20 return Create(client, settings); |
22 } | 21 } |
23 | 22 |
24 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( | 23 scoped_ptr<FakeLayerTreeHost> FakeLayerTreeHost::Create( |
25 FakeLayerTreeHostClient* client, | 24 FakeLayerTreeHostClient* client, |
26 const LayerTreeSettings& settings) { | 25 const LayerTreeSettings& settings) { |
27 LayerTreeHost::InitParams params; | 26 LayerTreeHost::InitParams params; |
28 params.client = client; | 27 params.client = client; |
29 params.settings = &settings; | 28 params.settings = &settings; |
30 return make_scoped_ptr(new FakeLayerTreeHost(client, ¶ms)); | 29 return make_scoped_ptr(new FakeLayerTreeHost(client, ¶ms)); |
(...skipping 10 matching lines...) Expand all Loading... |
41 | 40 |
42 scoped_ptr<LayerImpl> layer_impl = TreeSynchronizer::SynchronizeTrees( | 41 scoped_ptr<LayerImpl> layer_impl = TreeSynchronizer::SynchronizeTrees( |
43 root_layer(), old_root_layer_impl.Pass(), active_tree()); | 42 root_layer(), old_root_layer_impl.Pass(), active_tree()); |
44 TreeSynchronizer::PushProperties(root_layer(), layer_impl.get()); | 43 TreeSynchronizer::PushProperties(root_layer(), layer_impl.get()); |
45 | 44 |
46 active_tree()->SetRootLayer(layer_impl.Pass()); | 45 active_tree()->SetRootLayer(layer_impl.Pass()); |
47 return active_tree()->root_layer(); | 46 return active_tree()->root_layer(); |
48 } | 47 } |
49 | 48 |
50 } // namespace cc | 49 } // namespace cc |
OLD | NEW |