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

Unified Diff: cc/layer_tree_host_common.cc

Issue 12093067: Handle ui::Layer's visibility using cc::Layer's m_isDrawable flag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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
« cc/layer.h ('K') | « cc/layer_impl.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index bffc7db62a3c9001b034355b17915fb000ca1a60..9bc81b2525d74f6129e9e9ff01ae7c680963a080 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -221,7 +221,7 @@ static inline bool subtreeShouldBeSkipped(LayerImpl* layer)
// The opacity of a layer always applies to its children (either implicitly
// via a render surface or explicitly if the parent preserves 3D), so the
// entire subtree can be skipped if this layer is fully transparent.
- return !layer->opacity();
+ return !layer->opacity() || !layer->visible();
}
static inline bool subtreeShouldBeSkipped(Layer* layer)
@@ -229,7 +229,7 @@ static inline bool subtreeShouldBeSkipped(Layer* layer)
// If the opacity is being animated then the opacity on the main thread is unreliable
// (since the impl thread may be using a different opacity), so it should not be trusted.
// In particular, it should not cause the subtree to be skipped.
- return !layer->opacity() && !layer->opacityIsAnimating();
+ return (!layer->opacity() && !layer->opacityIsAnimating()) || !layer->visible();
}
// Called on each layer that could be drawn after all information from
« cc/layer.h ('K') | « cc/layer_impl.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698