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

Unified Diff: cc/trees/property_tree.h

Issue 2035863003: cc: Add mask and replica layer ids to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 6 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/occlusion_tracker_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 ac977a37108f01256c2c1bb082724819b506d945..622f652f342ab30e74c780abe79eacb37028b312 100644
--- a/cc/trees/property_tree.h
+++ b/cc/trees/property_tree.h
@@ -35,7 +35,7 @@ class TransformNodeData;
class TransformCachedNodeData;
class TransformTreeData;
class TreeNode;
-}
+} // namespace proto
class CopyOutputRequest;
class LayerTreeImpl;
@@ -308,6 +308,9 @@ struct CC_EXPORT EffectNodeData {
int clip_id;
// Effect node id of which this effect contributes to.
int target_id;
+ int mask_layer_id;
+ int replica_layer_id;
+ int replica_mask_layer_id;
bool operator==(const EffectNodeData& other) const;
@@ -612,6 +615,8 @@ class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
EffectTree& operator=(const EffectTree& from);
bool operator==(const EffectTree& other) const;
+ void clear();
+
float EffectiveOpacity(const EffectNode* node) const;
void UpdateEffects(int id);
@@ -626,6 +631,11 @@ class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
bool HasCopyRequests() const;
void ClearCopyRequests();
+ void AddMaskOrReplicaLayerId(int id);
+ const std::vector<int>& mask_replica_layer_ids() const {
+ return mask_replica_layer_ids_;
+ }
+
bool ContributesToDrawnSurface(int id);
void ResetChangeTracking();
@@ -642,6 +652,10 @@ class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
// Stores copy requests, keyed by node id.
std::unordered_multimap<int, std::unique_ptr<CopyOutputRequest>>
copy_requests_;
+
+ // Unsorted list of all mask, replica, and replica mask layer ids that
+ // effect nodes refer to.
+ std::vector<int> mask_replica_layer_ids_;
};
class CC_EXPORT ScrollTree final : public PropertyTree<ScrollNode> {
« no previous file with comments | « cc/trees/occlusion_tracker_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698