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

Unified Diff: cc/trees/property_tree.h

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
« 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 002bea1a37cd96105e6b5805d7c8bd326fe1f12f..c38778bb26dbdf55a70064173af029f2baa1ccfb 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -378,7 +378,8 @@ class CC_EXPORT PropertyTree {
int next_available_id() const { return static_cast<int>(size()); }
void ToProtobuf(proto::PropertyTree* proto) const;
- void FromProtobuf(const proto::PropertyTree& proto);
+ void FromProtobuf(const proto::PropertyTree& proto,
+ std::unordered_map<int, int>* node_id_to_index_map);
void SetPropertyTrees(PropertyTrees* property_trees) {
property_trees_ = property_trees;
@@ -505,7 +506,8 @@ class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> {
gfx::Transform ToScreenSpaceTransformWithoutSublayerScale(int id) const;
void ToProtobuf(proto::PropertyTree* proto) const;
- void FromProtobuf(const proto::PropertyTree& proto);
+ void FromProtobuf(const proto::PropertyTree& proto,
+ std::unordered_map<int, int>* node_id_to_index_map);
private:
// Returns true iff the node at |desc_id| is a descendant of the node at
@@ -561,7 +563,8 @@ class CC_EXPORT ClipTree final : public PropertyTree<ClipNode> {
gfx::RectF ViewportClip();
void ToProtobuf(proto::PropertyTree* proto) const;
- void FromProtobuf(const proto::PropertyTree& proto);
+ void FromProtobuf(const proto::PropertyTree& proto,
+ std::unordered_map<int, int>* node_id_to_index_map);
};
class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
@@ -581,7 +584,8 @@ class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
void ResetChangeTracking();
void ToProtobuf(proto::PropertyTree* proto) const;
- void FromProtobuf(const proto::PropertyTree& proto);
+ void FromProtobuf(const proto::PropertyTree& proto,
+ std::unordered_map<int, int>* node_id_to_index_map);
private:
void UpdateOpacities(EffectNode* node, EffectNode* parent_node);
@@ -599,7 +603,8 @@ class CC_EXPORT ScrollTree final : public PropertyTree<ScrollNode> {
bool operator==(const ScrollTree& other) const;
void ToProtobuf(proto::PropertyTree* proto) const;
- void FromProtobuf(const proto::PropertyTree& proto);
+ void FromProtobuf(const proto::PropertyTree& proto,
+ std::unordered_map<int, int>* node_id_to_index_map);
void clear();
@@ -665,6 +670,10 @@ class CC_EXPORT PropertyTrees final {
void ToProtobuf(proto::PropertyTrees* proto) const;
void FromProtobuf(const proto::PropertyTrees& proto);
+ 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;
TransformTree transform_tree;
EffectTree effect_tree;
ClipTree clip_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