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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { | 89 LayerImpl* FakeLayerTreeHost::CommitAndCreateLayerImplTree() { |
90 TreeSynchronizer::SynchronizeTrees(root_layer(), active_tree()); | 90 TreeSynchronizer::SynchronizeTrees(root_layer(), active_tree()); |
91 active_tree()->SetPropertyTrees(property_trees()); | 91 active_tree()->SetPropertyTrees(property_trees()); |
92 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), | 92 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), |
93 active_tree()); | 93 active_tree()); |
94 animation_host()->PushPropertiesTo(host_impl_.animation_host()); | 94 animation_host()->PushPropertiesTo(host_impl_.animation_host()); |
95 | 95 |
96 active_tree()->UpdatePropertyTreeScrollOffset(property_trees()); | 96 active_tree()->UpdatePropertyTreeScrollOffset(property_trees()); |
97 | 97 |
98 if (page_scale_layer() && inner_viewport_scroll_layer()) { | 98 if (layer_tree_.page_scale_layer() && |
| 99 layer_tree_.inner_viewport_scroll_layer()) { |
99 active_tree()->SetViewportLayersFromIds( | 100 active_tree()->SetViewportLayersFromIds( |
100 overscroll_elasticity_layer() ? overscroll_elasticity_layer()->id() | 101 layer_tree_.overscroll_elasticity_layer() |
101 : Layer::INVALID_ID, | 102 ? layer_tree_.overscroll_elasticity_layer()->id() |
102 page_scale_layer()->id(), inner_viewport_scroll_layer()->id(), | 103 : Layer::INVALID_ID, |
103 outer_viewport_scroll_layer() ? outer_viewport_scroll_layer()->id() | 104 layer_tree_.page_scale_layer()->id(), |
104 : Layer::INVALID_ID); | 105 layer_tree_.inner_viewport_scroll_layer()->id(), |
| 106 layer_tree_.outer_viewport_scroll_layer() |
| 107 ? layer_tree_.outer_viewport_scroll_layer()->id() |
| 108 : Layer::INVALID_ID); |
105 } | 109 } |
106 | 110 |
107 active_tree()->UpdatePropertyTreesForBoundsDelta(); | 111 active_tree()->UpdatePropertyTreesForBoundsDelta(); |
108 return active_tree()->root_layer_for_testing(); | 112 return active_tree()->root_layer_for_testing(); |
109 } | 113 } |
110 | 114 |
111 LayerImpl* FakeLayerTreeHost::CommitAndCreatePendingTree() { | 115 LayerImpl* FakeLayerTreeHost::CommitAndCreatePendingTree() { |
112 TreeSynchronizer::SynchronizeTrees(root_layer(), pending_tree()); | 116 TreeSynchronizer::SynchronizeTrees(root_layer(), pending_tree()); |
113 pending_tree()->SetPropertyTrees(property_trees()); | 117 pending_tree()->SetPropertyTrees(property_trees()); |
114 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), | 118 TreeSynchronizer::PushLayerProperties(root_layer()->GetLayerTree(), |
115 pending_tree()); | 119 pending_tree()); |
116 animation_host()->PushPropertiesTo(host_impl_.animation_host()); | 120 animation_host()->PushPropertiesTo(host_impl_.animation_host()); |
117 | 121 |
118 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); | 122 pending_tree()->UpdatePropertyTreeScrollOffset(property_trees()); |
119 return pending_tree()->root_layer_for_testing(); | 123 return pending_tree()->root_layer_for_testing(); |
120 } | 124 } |
121 | 125 |
122 } // namespace cc | 126 } // namespace cc |
OLD | NEW |