| 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 c2b77bd0ff1dab5daca92c288d6f89e036c32f63..db56baf13499e812c52d02cdafe8ba7815fb0a5b 100644
|
| --- a/cc/trees/layer_tree_host_common.cc
|
| +++ b/cc/trees/layer_tree_host_common.cc
|
| @@ -575,6 +575,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->uses_default_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 =
|
|
|