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

Unified Diff: cc/trees/layer_tree_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
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 7f2cb3adbe8f03550cd168e0ba4674e0e21a8286..f55e8c2644d8c141a494b7bb626aac98cf5abad4 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -488,6 +488,33 @@ void LayerTreeImpl::AddToOpacityAnimationsMap(int id, float opacity) {
opacity_animations_map_[id] = opacity;
}
+void LayerTreeImpl::UpdateLayerToPropertyTreeIndicesMap(
+ int id,
+ int tree_index,
+ PropertyTrees::Types tree_type) {
+ PropertyTreeIndices& indices = layer_to_property_tree_indices_map_[id];
+ switch (tree_type) {
+ case PropertyTrees::Types::TRANSFORM_TREE:
+ indices.transform_tree_index = tree_index;
+ break;
+ case PropertyTrees::Types::CLIP_TREE:
+ indices.clip_tree_index = tree_index;
+ break;
+ case PropertyTrees::Types::SCROLL_TREE:
+ indices.scroll_tree_index = tree_index;
+ break;
+ case PropertyTrees::Types::EFFECT_TREE:
+ indices.effect_tree_index = tree_index;
+ break;
+ default:
+ break;
+ }
+}
+
+void LayerTreeImpl::RemoveFromLayerToPropertyTreeIndicesMap(int id) {
+ layer_to_property_tree_indices_map_.erase(id);
+}
+
LayerTreeImpl::ElementLayers LayerTreeImpl::GetMutableLayers(
uint64_t element_id) {
auto iter = element_layers_map_.find(element_id);
@@ -2104,11 +2131,11 @@ void LayerTreeImpl::ScrollAnimationAbort(bool needs_completion) {
needs_completion);
}
-void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) {
+void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::Types type) {
layers_that_should_push_properties_.clear();
for (auto* layer : *this)
layer->ResetChangeTracking();
- property_trees_.ResetAllChangeTracking(flag);
+ property_trees_.ResetAllChangeTracking(type);
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698