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/layer_tree_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 | 201 |
202 if (IsActiveTree() && layer_tree_host_impl_->pending_tree()) | 202 if (IsActiveTree() && layer_tree_host_impl_->pending_tree()) |
203 layer_tree_host_impl_->pending_tree()->DidUpdateScrollOffset(layer_id); | 203 layer_tree_host_impl_->pending_tree()->DidUpdateScrollOffset(layer_id); |
204 } | 204 } |
205 | 205 |
206 void LayerTreeImpl::DidUpdateScrollState(int layer_id) { | 206 void LayerTreeImpl::DidUpdateScrollState(int layer_id) { |
207 if (!IsActiveTree()) | 207 if (!IsActiveTree()) |
208 return; | 208 return; |
209 | 209 |
| 210 DCHECK(lifecycle().AllowsPropertyTreeAccess()); |
| 211 |
210 // The scroll_clip_layer Layer properties should be up-to-date. | 212 // The scroll_clip_layer Layer properties should be up-to-date. |
211 // TODO(pdr): This DCHECK fails on existing tests but should be enabled. | 213 // TODO(pdr): This DCHECK fails on existing tests but should be enabled. |
212 // DCHECK(lifecycle().AllowsLayerPropertyAccess()); | 214 // DCHECK(lifecycle().AllowsLayerPropertyAccess()); |
213 | 215 |
214 if (layer_id == Layer::INVALID_ID) | 216 if (layer_id == Layer::INVALID_ID) |
215 return; | 217 return; |
216 | 218 |
217 int scroll_layer_id, clip_layer_id; | 219 int scroll_layer_id, clip_layer_id; |
218 if (IsViewportLayerId(layer_id)) { | 220 if (IsViewportLayerId(layer_id)) { |
219 if (!InnerViewportContainerLayer()) | 221 if (!InnerViewportContainerLayer()) |
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2101 | 2103 |
2102 void LayerTreeImpl::ResetAllChangeTracking() { | 2104 void LayerTreeImpl::ResetAllChangeTracking() { |
2103 layers_that_should_push_properties_.clear(); | 2105 layers_that_should_push_properties_.clear(); |
2104 // Iterate over all layers, including masks. | 2106 // Iterate over all layers, including masks. |
2105 for (auto& layer : *layers_) | 2107 for (auto& layer : *layers_) |
2106 layer->ResetChangeTracking(); | 2108 layer->ResetChangeTracking(); |
2107 property_trees_.ResetAllChangeTracking(); | 2109 property_trees_.ResetAllChangeTracking(); |
2108 } | 2110 } |
2109 | 2111 |
2110 } // namespace cc | 2112 } // namespace cc |
OLD | NEW |