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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 979 } | 979 } |
| 980 | 980 |
| 981 ScrollTree& LayerImpl::GetScrollTree() const { | 981 ScrollTree& LayerImpl::GetScrollTree() const { |
| 982 return GetPropertyTrees()->scroll_tree; | 982 return GetPropertyTrees()->scroll_tree; |
| 983 } | 983 } |
| 984 | 984 |
| 985 TransformTree& LayerImpl::GetTransformTree() const { | 985 TransformTree& LayerImpl::GetTransformTree() const { |
| 986 return GetPropertyTrees()->transform_tree; | 986 return GetPropertyTrees()->transform_tree; |
| 987 } | 987 } |
| 988 | 988 |
| 989 bool LayerImpl::EnsureValidPropertyTreeIndices() const { | |
|
enne (OOO)
2017/06/02 18:41:19
I know there's a link to the bug at the callsite,
Khushal
2017/06/02 18:47:02
Sure. Done.
| |
| 990 const bool has_valid_transform_node = | |
| 991 GetTransformTree().Node(transform_tree_index()); | |
| 992 DCHECK(has_valid_transform_node); | |
| 993 | |
| 994 const bool has_valid_effect_node = GetEffectTree().Node(effect_tree_index()); | |
| 995 DCHECK(has_valid_effect_node); | |
| 996 | |
| 997 const bool has_valid_clip_node = GetClipTree().Node(clip_tree_index()); | |
| 998 DCHECK(has_valid_clip_node); | |
| 999 | |
| 1000 const bool has_valid_scroll_node = GetScrollTree().Node(scroll_tree_index()); | |
| 1001 DCHECK(has_valid_scroll_node); | |
| 1002 | |
| 1003 return has_valid_transform_node && has_valid_effect_node && | |
| 1004 has_valid_clip_node && has_valid_scroll_node; | |
| 1005 } | |
| 1006 | |
| 989 } // namespace cc | 1007 } // namespace cc |
| OLD | NEW |