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

Unified Diff: cc/trees/property_tree.h

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/layer_tree_host_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.h
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h
index c56126a05bb68a32b1da9c7ac5bce23d15083a0b..db53f85e5d6b043f6c7369164019a48ec2200f70 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -527,12 +527,25 @@ class CC_EXPORT PropertyTrees final {
bool operator==(const PropertyTrees& other) const;
PropertyTrees& operator=(const PropertyTrees& from);
+ // These maps map from layer id to the index for each of the respective
+ // property node types.
std::unordered_map<int, int> transform_id_to_index_map;
std::unordered_map<int, int> effect_id_to_index_map;
std::unordered_map<int, int> clip_id_to_index_map;
std::unordered_map<int, int> scroll_id_to_index_map;
enum TreeType { TRANSFORM, EFFECT, CLIP, SCROLL };
+ // These maps allow mapping directly from a compositor element id to the
+ // respective property node. This will eventually allow simplifying logic in
+ // various places that today has to map from element id to layer id, and then
+ // from layer id to the respective property node. Completing that work is
+ // pending the launch of Slimming Paint v2 and reworking UI compositor logic
+ // to produce cc property trees and these maps.
+ std::unordered_map<ElementId, int, ElementIdHash>
+ element_id_to_effect_node_index;
+ std::unordered_map<ElementId, int, ElementIdHash>
+ element_id_to_transform_node_index;
+
std::vector<int> always_use_active_tree_opacity_effect_ids;
TransformTree transform_tree;
EffectTree effect_tree;
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698