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 70c5037221d1979579ac149f2fe0190b205834a9..40fa71194601184a10245ffb5a1dcc02d32d0e69 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -343,7 +343,8 @@ template <typename LayerType> static inline bool IsRootLayer(LayerType* layer) { |
template <typename LayerType> |
static inline bool LayerIsInExisting3DRenderingContext(LayerType* layer) { |
return layer->Is3dSorted() && layer->parent() && |
- layer->parent()->Is3dSorted(); |
+ layer->parent()->Is3dSorted() && |
+ (layer->parent()->sorting_context_id() == layer->sorting_context_id()); |
} |
template <typename LayerType> |