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

Unified Diff: cc/layers/layer_impl.cc

Issue 1841443003: cc : Use effect tree to determine if a layer is inside copy request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/layers/layer_impl.h ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index dfd03649b9473dd62d7f8a481a62ea5ac9d4d84c..2fea907c93b99afd7fdd9ad2bf06a5293da1728a 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -292,9 +292,12 @@ void LayerImpl::TakeCopyRequestsAndTransformToTarget(
layer_tree_impl()->set_needs_update_draw_properties();
}
-bool LayerImpl::AnchestorHasCopyRequest() const {
- for (const LayerImpl* layer = this; layer; layer = layer->parent()) {
- if (layer->HasCopyRequest())
+bool LayerImpl::InsideCopyRequest() const {
+ EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree;
+ EffectNode* node = effect_tree.Node(effect_tree_index_);
+
+ for (; node; node = effect_tree.parent(node)) {
+ if (node->data.has_copy_request)
return true;
}
return false;
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698