| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/tree_synchronizer.h" | 5 #include "cc/trees/tree_synchronizer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
| 13 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
| 14 #include "cc/layers/layer_collections.h" | 14 #include "cc/layers/layer_collections.h" |
| 15 #include "cc/layers/layer_impl.h" | 15 #include "cc/layers/layer_impl.h" |
| 16 #include "cc/trees/layer_tree.h" |
| 16 #include "cc/trees/layer_tree_host.h" | 17 #include "cc/trees/layer_tree_host.h" |
| 17 #include "cc/trees/layer_tree_impl.h" | 18 #include "cc/trees/layer_tree_impl.h" |
| 18 | 19 |
| 19 namespace cc { | 20 namespace cc { |
| 20 | 21 |
| 21 template <typename LayerTreeType> | 22 template <typename LayerTreeType> |
| 22 void SynchronizeTreesInternal(LayerTreeType* source_tree, | 23 void SynchronizeTreesInternal(LayerTreeType* source_tree, |
| 23 LayerTreeImpl* tree_impl, | 24 LayerTreeImpl* tree_impl, |
| 24 PropertyTrees* property_trees) { | 25 PropertyTrees* property_trees) { |
| 25 DCHECK(tree_impl); | 26 DCHECK(tree_impl); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 layer->PushPropertiesTo(layer_impl); | 98 layer->PushPropertiesTo(layer_impl); |
| 98 } | 99 } |
| 99 } | 100 } |
| 100 | 101 |
| 101 void TreeSynchronizer::PushLayerProperties(LayerTreeImpl* pending_tree, | 102 void TreeSynchronizer::PushLayerProperties(LayerTreeImpl* pending_tree, |
| 102 LayerTreeImpl* active_tree) { | 103 LayerTreeImpl* active_tree) { |
| 103 PushLayerPropertiesInternal(pending_tree->LayersThatShouldPushProperties(), | 104 PushLayerPropertiesInternal(pending_tree->LayersThatShouldPushProperties(), |
| 104 active_tree); | 105 active_tree); |
| 105 } | 106 } |
| 106 | 107 |
| 107 void TreeSynchronizer::PushLayerProperties(LayerTreeHost* host_tree, | 108 void TreeSynchronizer::PushLayerProperties(LayerTree* host_tree, |
| 108 LayerTreeImpl* impl_tree) { | 109 LayerTreeImpl* impl_tree) { |
| 109 PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(), | 110 PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(), |
| 110 impl_tree); | 111 impl_tree); |
| 111 } | 112 } |
| 112 | 113 |
| 114 void TreeSynchronizer::PushLayerProperties(LayerTreeHost* host_tree, |
| 115 LayerTreeImpl* impl_tree) { |
| 116 PushLayerProperties(host_tree->GetLayerTree(), impl_tree); |
| 117 } |
| 118 |
| 113 } // namespace cc | 119 } // namespace cc |
| OLD | NEW |