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

Unified Diff: cc/trees/property_tree_builder.cc

Issue 2612093002: Build mapping from element id to transform/effect nodes. (Closed)
Patch Set: Sync to head. 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
« no previous file with comments | « 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 f66fcda90e52146e4886f811b9225547aee64cf8..8cac600ba14507e71f3a39f3101c7525bd0d25c9 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -636,6 +636,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;
@@ -1101,6 +1108,13 @@ bool AddEffectNodeIfNeeded(
data_for_children->property_trees->effect_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 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) {
« no previous file with comments | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698