Index: cc/trees/layer_tree_host_common.cc |
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc |
index 2e3d8402c7e9b078b10c796afc2854732626df35..4a616eb942bc450f875cabda5b1cde8db7a21d1f 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -232,6 +232,10 @@ static bool LayerShouldBeSkipped(LayerType* layer) { |
} |
static inline bool SubtreeShouldBeSkipped(LayerImpl* layer) { |
+ // The embedder can request to hide the entire layer's subtree. |
+ if (layer->hide_layer_and_subtree()) |
+ return true; |
+ |
// If layer is on the pending tree and opacity is being animated then |
// this subtree can't be skipped as we need to create, prioritize and |
// include tiles for this layer when deciding if tree can be activated. |
@@ -245,6 +249,10 @@ static inline bool SubtreeShouldBeSkipped(LayerImpl* layer) { |
} |
static inline bool SubtreeShouldBeSkipped(Layer* layer) { |
+ // The embedder can request to hide the entire layer's subtree. |
+ if (layer->hide_layer_and_subtree()) |
+ return true; |
+ |
// 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. |
@@ -1493,7 +1501,7 @@ static void CalculateDrawPropertiesInternal( |
UpdateTilePrioritiesForLayer(layer); |
// If neither this layer nor any of its children were added, early out. |
- if (sorting_start_index == descendants.size()) |
+ if (!IsRootLayer(layer) && sorting_start_index == descendants.size()) |
enne (OOO)
2013/06/20 00:17:47
If the root layer doesn't draw, why does it need t
danakj
2013/06/20 00:20:04
Because otherwise the impl layer doesn't get the r
|
return; |
// If preserves-3d then sort all the descendants in 3D so that they can be |