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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 2612093002: Build mapping from element id to transform/effect nodes. (Closed)
Patch Set: Check tree size in test. Created 3 years, 11 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
« cc/trees/property_tree.h ('K') | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_builder.cc
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index 91d812c2558c2f646b638151ffcf4736e7e3ef01..f4e882152e6cccf237450aa80739ff9ca1a00533 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -622,6 +622,13 @@ bool AddTransformNodeIfNeeded(
data_for_children->property_trees->transform_id_to_index_map[layer->id()] =
node->id;
+ // For animation subsystem purposes, if this layer has a compositor element
+ // id, we build a map from that id to this transform node.
+ if (layer->element_id()) {
+ data_for_children->property_trees
+ ->element_id_to_transform_node_index[layer->element_id()] = node->id;
+ }
+
node->scrolls = is_scrollable;
node->should_be_snapped = is_snapped;
node->flattens_inherited_transform = data_for_children->should_flatten;
@@ -1095,6 +1102,13 @@ bool AddEffectNodeIfNeeded(
data_for_children->property_trees->effect_id_to_index_map[layer->id()] =
data_for_children->effect_tree_parent;
+ // For animation subsystem purposes, if this layer has a compositor element
+ // id, we build a map from that id to this effect node.
+ if (layer->element_id()) {
+ data_for_children->property_trees
+ ->element_id_to_effect_node_index[layer->element_id()] = node_id;
+ }
+
std::vector<std::unique_ptr<CopyOutputRequest>> layer_copy_requests;
TakeCopyRequests(layer, &layer_copy_requests);
for (auto& it : layer_copy_requests) {
« cc/trees/property_tree.h ('K') | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698