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 |