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 4d14ff772a17136e83470fb4a32875d825aaf62a..377786c99e08e28ae22f7081dd70b048340161df 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -1760,13 +1760,16 @@ static void CalculateDrawPropertiesInternal( |
DCHECK(layer->render_surface()); |
// Check back-face visibility before continuing with this surface and its |
// subtree |
+ RenderSurfaceImpl* render_surface = layer->render_surface(); |
if (!layer->double_sided() && |
IsSurfaceBackFaceVisible(layer, combined_transform)) { |
+ gfx::Transform draw_transform = combined_transform; |
ajuma
2015/11/10 00:17:15
Please add a comment that we need this logic since
|
+ draw_transform.Scale(1.0 / combined_transform_scales.x(), |
+ 1.0 / combined_transform_scales.y()); |
+ render_surface->SetDrawTransform(draw_transform); |
jaydasika
2015/11/09 22:56:45
CDP and PT render surface draw transform don't mat
ajuma
2015/11/09 23:31:21
Is this because the "skipped" surface is still win
|
return; |
} |
- RenderSurfaceImpl* render_surface = layer->render_surface(); |
- |
if (IsRootLayer(layer)) { |
// The root layer's render surface size is predetermined and so the root |
// layer can't directly support non-identity transforms. It should just |
@@ -2478,12 +2481,6 @@ void CalculateRenderSurfaceLayerListInternal( |
if (render_to_separate_surface) { |
DCHECK(layer->render_surface()); |
- if (!layer->double_sided() && |
- IsSurfaceBackFaceVisible(layer, layer->draw_transform())) { |
- layer->ClearRenderSurfaceLayerList(); |
- layer->draw_properties().render_target = nullptr; |
- return; |
- } |
if (use_property_trees) { |
RenderSurfaceDrawProperties draw_properties; |
@@ -2504,6 +2501,14 @@ void CalculateRenderSurfaceLayerListInternal( |
layer->render_surface()->SetClipRect(draw_properties.clip_rect); |
} |
+ if (!layer->double_sided() && |
+ IsSurfaceBackFaceVisible(layer, |
+ layer->render_surface()->draw_transform())) { |
+ layer->ClearRenderSurfaceLayerList(); |
+ layer->draw_properties().render_target = nullptr; |
ajuma
2015/11/09 23:31:21
Would calling RemoveSurfaceForEarlyExit here fix t
jaydasika
2015/11/10 00:06:40
No that won't still fix the mismatch. We either ne
ajuma
2015/11/10 00:17:15
Oh, I think I understand: the old code relied on t
|
+ return; |
+ } |
+ |
if (IsRootLayer(layer)) { |
// The root surface does not contribute to any other surface, it has no |
// target. |