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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 1947683007: cc : Add subtree is hidden bool to effect tree (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/proto/property_tree.proto ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index 83572680b861c38505dde2048b548e8e691a2ae1..0d8250c79fc46a6603d38ef89de2694b2c931253 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -855,7 +855,7 @@ static float LayerDrawOpacity(const LayerImpl* layer, const EffectTree& tree) {
float draw_opacity = 1.f;
while (node != target_node) {
- draw_opacity *= node->data.opacity;
+ draw_opacity *= tree.EffectiveOpacity(node);
node = tree.parent(node);
}
return draw_opacity;
@@ -866,10 +866,10 @@ static void SetSurfaceDrawOpacity(const EffectTree& tree,
// Draw opacity of a surface is the product of opacities between the surface
// (included) and its target surface (excluded).
const EffectNode* node = tree.Node(render_surface->EffectTreeIndex());
- float draw_opacity = node->data.opacity;
+ float draw_opacity = tree.EffectiveOpacity(node);
for (node = tree.parent(node); node && !node->data.has_render_surface;
node = tree.parent(node)) {
- draw_opacity *= node->data.opacity;
+ draw_opacity *= tree.EffectiveOpacity(node);
}
render_surface->SetDrawOpacity(draw_opacity);
}
« no previous file with comments | « cc/proto/property_tree.proto ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698