Index: cc/layer_tree_host_common.cc |
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc |
index ca7d45050f85c0857e5f88a4def5818ef1b5374e..7c68f80c5d2280282bfaafccf049e389514d8da3 100644 |
--- a/cc/layer_tree_host_common.cc |
+++ b/cc/layer_tree_host_common.cc |
@@ -259,7 +259,7 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig |
return true; |
// If the layer has opacity != 1 and does not have a preserves-3d transform style. |
- if (layer->opacity() != 1 && !layer->preserves3D() && descendantDrawsContent) |
+ if (layer->opacity() != 1 && !layer->preserves3D() && layer->drawsContent() && descendantDrawsContent) |
return true; |
return false; |
@@ -484,17 +484,17 @@ static void calculateDrawTransformsInternal(LayerType* layer, const WebTransform |
gfx::Rect clipRectForSubtree; |
bool subtreeShouldBeClipped = false; |
- |
+ |
float drawOpacity = layer->opacity(); |
bool drawOpacityIsAnimating = layer->opacityIsAnimating(); |
- if (layer->parent() && layer->parent()->preserves3D()) { |
+ if (layer->parent()) { |
drawOpacity *= layer->parent()->drawOpacity(); |
drawOpacityIsAnimating |= layer->parent()->drawOpacityIsAnimating(); |
} |
bool animatingTransformToTarget = layer->transformIsAnimating(); |
bool animatingTransformToScreen = animatingTransformToTarget; |
- if (layer->parent()) { |
+ if (layer->parent() && !layer->parent()->renderSurface()) { |
shawnsingh
2012/11/26 19:03:08
I think our discussion also applies to this if-sta
danakj
2012/11/26 19:09:44
Yes, the check was added to the wrong if statement
|
animatingTransformToTarget |= layer->parent()->drawTransformIsAnimating(); |
animatingTransformToScreen |= layer->parent()->screenSpaceTransformIsAnimating(); |
} |