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) { |