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

Unified Diff: cc/layers/layer_impl.cc

Issue 2033453002: cc : Fix effect tree index bug in cc::LayerImpl::Opacity (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 | « no previous file | cc/trees/layer_tree_host_impl_unittest.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 c0badc3bd70ab98621bc2eec3dbb1ba0c42fdaef..eb1ea0a215f4998637ae0aeae2d22b2083de2930 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -933,11 +933,11 @@ void LayerImpl::SetContentsOpaque(bool opaque) {
}
float LayerImpl::Opacity() const {
- if (!layer_tree_impl()->property_trees()->IsInIdToIndexMap(
- PropertyTrees::TreeType::EFFECT, id()))
+ PropertyTrees* property_trees = layer_tree_impl()->property_trees();
+ if (!property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::EFFECT, id()))
return 1.f;
- EffectNode* node =
- layer_tree_impl()->property_trees()->effect_tree.Node(effect_tree_index_);
+ EffectNode* node = property_trees->effect_tree.Node(
+ property_trees->effect_id_to_index_map[id()]);
return node->data.opacity;
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698