Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Unified Diff: cc/layers/layer_impl.cc

Issue 1975623002: cc : Add LayerToPropertyTreeIndices map to PropertyTrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698