| 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 "base/containers/hash_tables.h" | 7 #include "base/containers/hash_tables.h" |
| 8 #include "base/containers/scoped_ptr_hash_map.h" |
| 8 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "cc/animation/scrollbar_animation_controller.h" | 11 #include "cc/animation/scrollbar_animation_controller.h" |
| 11 #include "cc/input/scrollbar.h" | 12 #include "cc/input/scrollbar.h" |
| 12 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
| 13 #include "cc/layers/layer_impl.h" | 14 #include "cc/layers/layer_impl.h" |
| 14 #include "cc/layers/painted_scrollbar_layer.h" | 15 #include "cc/layers/painted_scrollbar_layer.h" |
| 15 #include "cc/layers/painted_scrollbar_layer_impl.h" | 16 #include "cc/layers/painted_scrollbar_layer_impl.h" |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 | 19 |
| 19 typedef ScopedPtrHashMap<int, LayerImpl> ScopedPtrLayerImplMap; | 20 typedef base::ScopedPtrHashMap<int, LayerImpl> ScopedPtrLayerImplMap; |
| 20 typedef base::hash_map<int, LayerImpl*> RawPtrLayerImplMap; | 21 typedef base::hash_map<int, LayerImpl*> RawPtrLayerImplMap; |
| 21 | 22 |
| 22 void CollectExistingLayerImplRecursive(ScopedPtrLayerImplMap* old_layers, | 23 void CollectExistingLayerImplRecursive(ScopedPtrLayerImplMap* old_layers, |
| 23 scoped_ptr<LayerImpl> layer_impl) { | 24 scoped_ptr<LayerImpl> layer_impl) { |
| 24 if (!layer_impl) | 25 if (!layer_impl) |
| 25 return; | 26 return; |
| 26 | 27 |
| 27 OwnedLayerImplList& children = layer_impl->children(); | 28 OwnedLayerImplList& children = layer_impl->children(); |
| 28 for (OwnedLayerImplList::iterator it = children.begin(); | 29 for (OwnedLayerImplList::iterator it = children.begin(); |
| 29 it != children.end(); | 30 it != children.end(); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 layer, layer_impl, &num_dependents_need_push_properties); | 256 layer, layer_impl, &num_dependents_need_push_properties); |
| 256 } | 257 } |
| 257 | 258 |
| 258 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { | 259 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { |
| 259 size_t num_dependents_need_push_properties = 0; | 260 size_t num_dependents_need_push_properties = 0; |
| 260 PushPropertiesInternal( | 261 PushPropertiesInternal( |
| 261 layer, layer_impl, &num_dependents_need_push_properties); | 262 layer, layer_impl, &num_dependents_need_push_properties); |
| 262 } | 263 } |
| 263 | 264 |
| 264 } // namespace cc | 265 } // namespace cc |
| OLD | NEW |