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

Unified Diff: cc/trees/property_tree.cc

Issue 2067783002: cc: Calculate visible rect inside non root copy request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rectF
Patch Set: edit comment to be more explicit 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/property_tree.h ('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.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index 1bf2af33f0b238e34fd5bca6609f536d13aed9e7..d9622d7d00c1ee61903ba7583ebabdfb020002a8 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -1625,6 +1625,22 @@ void EffectTree::ClearCopyRequests() {
set_needs_update(true);
}
+int EffectTree::ClosestAncestorWithCopyRequest(int id) const {
+ DCHECK_GE(id, 0);
+ const EffectNode* node = Node(id);
+ while (node->id > 1) {
+ if (node->data.has_copy_request)
+ return node->id;
+
+ node = parent(node);
+ }
+
+ if (node->data.has_copy_request)
+ return node->id;
+ else
+ return -1;
+}
+
void EffectTree::AddMaskOrReplicaLayerId(int id) {
mask_replica_layer_ids_.push_back(id);
}
« no previous file with comments | « cc/trees/property_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698