Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 273 return scroll_tree.ScrollBy(scroll_node, scroll, layer_tree_impl()); | 273 return scroll_tree.ScrollBy(scroll_node, scroll, layer_tree_impl()); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void LayerImpl::SetScrollClipLayer(int scroll_clip_layer_id) { | 276 void LayerImpl::SetScrollClipLayer(int scroll_clip_layer_id) { |
| 277 if (scroll_clip_layer_id_ == scroll_clip_layer_id) | 277 if (scroll_clip_layer_id_ == scroll_clip_layer_id) |
| 278 return; | 278 return; |
| 279 | 279 |
| 280 layer_tree_impl()->UnregisterScrollLayer(this); | 280 layer_tree_impl()->UnregisterScrollLayer(this); |
| 281 scroll_clip_layer_id_ = scroll_clip_layer_id; | 281 scroll_clip_layer_id_ = scroll_clip_layer_id; |
| 282 layer_tree_impl()->RegisterScrollLayer(this); | 282 layer_tree_impl()->RegisterScrollLayer(this); |
| 283 | |
| 284 // Ensure our viewport layer type is updated. | |
|
chrishtr
2017/05/15 18:50:45
Per offline, let's pull this out.
| |
| 285 layer_tree_impl()->UpdateViewportLayerTypes(); | |
| 286 } | 283 } |
| 287 | 284 |
| 288 LayerImpl* LayerImpl::scroll_clip_layer() const { | 285 LayerImpl* LayerImpl::scroll_clip_layer() const { |
| 289 return layer_tree_impl()->LayerById(scroll_clip_layer_id_); | 286 return layer_tree_impl()->LayerById(scroll_clip_layer_id_); |
| 290 } | 287 } |
| 291 | 288 |
| 292 bool LayerImpl::scrollable() const { | 289 bool LayerImpl::scrollable() const { |
| 293 return scroll_clip_layer_id_ != Layer::INVALID_ID; | 290 return scroll_clip_layer_id_ != Layer::INVALID_ID; |
| 294 } | 291 } |
| 295 | 292 |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 973 | 970 |
| 974 ScrollTree& LayerImpl::GetScrollTree() const { | 971 ScrollTree& LayerImpl::GetScrollTree() const { |
| 975 return GetPropertyTrees()->scroll_tree; | 972 return GetPropertyTrees()->scroll_tree; |
| 976 } | 973 } |
| 977 | 974 |
| 978 TransformTree& LayerImpl::GetTransformTree() const { | 975 TransformTree& LayerImpl::GetTransformTree() const { |
| 979 return GetPropertyTrees()->transform_tree; | 976 return GetPropertyTrees()->transform_tree; |
| 980 } | 977 } |
| 981 | 978 |
| 982 } // namespace cc | 979 } // namespace cc |
| OLD | NEW |