| 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/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "cc/animation/scrollbar_animation_controller.h" | 9 #include "cc/animation/scrollbar_animation_controller.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 LayerType* layer) { | 141 LayerType* layer) { |
| 142 if (!layer) | 142 if (!layer) |
| 143 return; | 143 return; |
| 144 | 144 |
| 145 for (size_t i = 0; i < layer->children().size(); ++i) { | 145 for (size_t i = 0; i < layer->children().size(); ++i) { |
| 146 UpdateScrollbarLayerPointersRecursiveInternal< | 146 UpdateScrollbarLayerPointersRecursiveInternal< |
| 147 LayerType, ScrollbarLayerType>(new_layers, layer->child_at(i)); | 147 LayerType, ScrollbarLayerType>(new_layers, layer->child_at(i)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 ScrollbarLayerType* scrollbar_layer = layer->ToScrollbarLayer(); | 150 ScrollbarLayerType* scrollbar_layer = layer->ToScrollbarLayer(); |
| 151 // Pinch-zoom scrollbars will have an invalid scrollLayerId, but they are | 151 // Pinch-zoom scrollbars will have an invalid scroll_layer_id, but they are |
| 152 // managed by LayerTreeImpl and not LayerImpl, so should not be | 152 // managed by LayerTreeImpl and not LayerImpl, so should not be |
| 153 // processed here. | 153 // processed here. |
| 154 if (!scrollbar_layer || (scrollbar_layer->scroll_layer_id() == | 154 if (!scrollbar_layer || (scrollbar_layer->scroll_layer_id() == |
| 155 Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID)) | 155 Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID)) |
| 156 return; | 156 return; |
| 157 | 157 |
| 158 RawPtrLayerImplMap::const_iterator iter = | 158 RawPtrLayerImplMap::const_iterator iter = |
| 159 new_layers->find(scrollbar_layer->id()); | 159 new_layers->find(scrollbar_layer->id()); |
| 160 ScrollbarLayerImpl* scrollbar_layer_impl = | 160 ScrollbarLayerImpl* scrollbar_layer_impl = |
| 161 iter != new_layers->end() ? static_cast<ScrollbarLayerImpl*>(iter->second) | 161 iter != new_layers->end() ? static_cast<ScrollbarLayerImpl*>(iter->second) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 void TreeSynchronizer::PushProperties(Layer* layer, LayerImpl* layer_impl) { | 209 void TreeSynchronizer::PushProperties(Layer* layer, LayerImpl* layer_impl) { |
| 210 PushPropertiesInternal(layer, layer_impl); | 210 PushPropertiesInternal(layer, layer_impl); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { | 213 void TreeSynchronizer::PushProperties(LayerImpl* layer, LayerImpl* layer_impl) { |
| 214 PushPropertiesInternal(layer, layer_impl); | 214 PushPropertiesInternal(layer, layer_impl); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace cc | 217 } // namespace cc |
| OLD | NEW |