| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
| 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/animation/scrollbar_animation_controller.h" | 13 #include "cc/animation/scrollbar_animation_controller.h" |
| 14 #include "cc/input/scrollbar.h" | 14 #include "cc/input/scrollbar.h" |
| 15 #include "cc/layers/layer.h" | 15 #include "cc/layers/layer.h" |
| 16 #include "cc/layers/layer_impl.h" | 16 #include "cc/layers/layer_impl.h" |
| 17 #include "cc/layers/scrollbar_layer_impl_base.h" | 17 #include "cc/layers/scrollbar_layer_impl_base.h" |
| 18 #include "cc/layers/scrollbar_layer_interface.h" | 18 #include "cc/layers/scrollbar_layer_interface.h" |
| 19 | 19 |
| 20 namespace cc { | 20 namespace cc { |
| 21 | 21 |
| 22 typedef base::ScopedPtrHashMap<int, LayerImpl> ScopedPtrLayerImplMap; | 22 typedef base::ScopedPtrHashMap<int, scoped_ptr<LayerImpl>> |
| 23 ScopedPtrLayerImplMap; |
| 23 typedef base::hash_map<int, LayerImpl*> RawPtrLayerImplMap; | 24 typedef base::hash_map<int, LayerImpl*> RawPtrLayerImplMap; |
| 24 | 25 |
| 25 void CollectExistingLayerImplRecursive(ScopedPtrLayerImplMap* old_layers, | 26 void CollectExistingLayerImplRecursive(ScopedPtrLayerImplMap* old_layers, |
| 26 scoped_ptr<LayerImpl> layer_impl) { | 27 scoped_ptr<LayerImpl> layer_impl) { |
| 27 if (!layer_impl) | 28 if (!layer_impl) |
| 28 return; | 29 return; |
| 29 | 30 |
| 30 layer_impl->ClearScrollbars(); | 31 layer_impl->ClearScrollbars(); |
| 31 if (ScrollbarLayerImplBase* scrollbar_layer = | 32 if (ScrollbarLayerImplBase* scrollbar_layer = |
| 32 layer_impl->ToScrollbarLayer()) { | 33 layer_impl->ToScrollbarLayer()) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 #endif | 303 #endif |
| 303 } | 304 } |
| 304 | 305 |
| 305 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { | 306 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { |
| 306 size_t num_dependents_need_push_properties = 0; | 307 size_t num_dependents_need_push_properties = 0; |
| 307 PushPropertiesInternal( | 308 PushPropertiesInternal( |
| 308 layer, layer_impl, &num_dependents_need_push_properties); | 309 layer, layer_impl, &num_dependents_need_push_properties); |
| 309 } | 310 } |
| 310 | 311 |
| 311 } // namespace cc | 312 } // namespace cc |
| OLD | NEW |