Chromium Code Reviews| Index: cc/layers/layer_impl.cc |
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
| index 019f62048dd03b09c5ce7272c743e6b8ab2aa359..94d6f76850f9d749e763d9da8c0b11e0397b220c 100644 |
| --- a/cc/layers/layer_impl.cc |
| +++ b/cc/layers/layer_impl.cc |
| @@ -101,6 +101,7 @@ LayerImpl::~LayerImpl() { |
| layer_tree_impl_->UnregisterScrollLayer(this); |
| layer_tree_impl_->UnregisterLayer(this); |
| layer_tree_impl_->RemoveLayerShouldPushProperties(this); |
| + layer_tree_impl_->RemoveFromLayerToPropertyTreeIndicesMap(layer_id_); |
| layer_tree_impl_->RemoveFromElementMap(this); |
| @@ -181,21 +182,33 @@ void LayerImpl::ApplyScroll(ScrollState* scroll_state) { |
| void LayerImpl::SetTransformTreeIndex(int index) { |
| transform_tree_index_ = index; |
| + if (layer_tree_impl_) |
|
ajuma
2016/05/12 00:54:56
Is layer_tree_impl_ ever null? It's assumed to be
|
| + layer_tree_impl()->UpdateLayerToPropertyTreeIndicesMap( |
| + id(), index, PropertyTrees::Types::TRANSFORM_TREE); |
| SetNeedsPushProperties(); |
| } |
| void LayerImpl::SetClipTreeIndex(int index) { |
| clip_tree_index_ = index; |
| + if (layer_tree_impl_) |
| + layer_tree_impl()->UpdateLayerToPropertyTreeIndicesMap( |
| + id(), index, PropertyTrees::Types::CLIP_TREE); |
| SetNeedsPushProperties(); |
| } |
| void LayerImpl::SetEffectTreeIndex(int index) { |
| effect_tree_index_ = index; |
| + if (layer_tree_impl_) |
| + layer_tree_impl()->UpdateLayerToPropertyTreeIndicesMap( |
| + id(), index, PropertyTrees::Types::EFFECT_TREE); |
| SetNeedsPushProperties(); |
| } |
| void LayerImpl::SetScrollTreeIndex(int index) { |
| scroll_tree_index_ = index; |
| + if (layer_tree_impl_) |
| + layer_tree_impl()->UpdateLayerToPropertyTreeIndicesMap( |
| + id(), index, PropertyTrees::Types::SCROLL_TREE); |
| SetNeedsPushProperties(); |
| } |