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 f4c2029e7fa19263f98ecc67ac2806fc0924d5e8..9059ae1c0021097639768269fc38115190b63101 100644 |
--- a/cc/trees/layer_tree_host_common.cc |
+++ b/cc/trees/layer_tree_host_common.cc |
@@ -1816,8 +1816,6 @@ static void CalculateDrawPropertiesInternal( |
// layer's "screen space" and local content space. |
layer_draw_properties.screen_space_transform = |
data_from_ancestor.full_hierarchy_matrix; |
- if (layer->should_flatten_transform()) |
- layer_draw_properties.screen_space_transform.FlattenTo2d(); |
layer_draw_properties.screen_space_transform.PreconcatTransform |
(layer_draw_properties.target_space_transform); |
@@ -1936,6 +1934,10 @@ static void CalculateDrawPropertiesInternal( |
data_for_children.full_hierarchy_matrix.PreconcatTransform( |
render_surface->draw_transform()); |
+ // A render surface inherently acts as a flattening point for the content of |
+ // its descendants. |
+ data_for_children.full_hierarchy_matrix.FlattenTo2d(); |
+ |
if (layer->mask_layer()) { |
DrawProperties<LayerType>& mask_layer_draw_properties = |
layer->mask_layer()->draw_properties(); |