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 378e7c800bdab9a241ac7838ccd9b718ae727bd4..a5fe7679c761a89c621fb081dabbb6a7cd83f0c0 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -576,6 +576,30 @@ static bool SubtreeShouldRenderToSeparateSurface( |
return true; |
} |
+ // If the layer has blending. |
+ // TODO(rosca): this is temporary, until blending is implemented for other |
+ // types of quads than RenderPassQuad. Layers having descendants that draw |
+ // content will still create a separate rendering surface. |
+ if (layer->has_blend_mode()) { |
+ TRACE_EVENT_INSTANT0( |
+ "cc", |
+ "LayerTreeHostCommon::SubtreeShouldRenderToSeparateSurface blending", |
+ TRACE_EVENT_SCOPE_THREAD); |
+ return true; |
+ } |
+ |
+ // If the layer has isolation. |
+ // TODO(rosca): to be optimized - create separate rendering surface only when |
+ // the blending descendants might have access to the content behind this layer |
+ // (layer has transparent background or descendants overflow) |
+ if (layer->is_root_for_isolated_group()) { |
+ TRACE_EVENT_INSTANT0( |
+ "cc", |
+ "LayerTreeHostCommon::SubtreeShouldRenderToSeparateSurface isolation", |
+ TRACE_EVENT_SCOPE_THREAD); |
+ return true; |
+ } |
+ |
// If the layer clips its descendants but it is not axis-aligned with respect |
// to its parent. |
bool layer_clips_external_content = |