Chromium Code Reviews| Index: cc/trees/property_tree_builder.cc |
| diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc |
| index 7853b0112b26755ef0fb16dbc1063d07a975f78c..ab44f929880710a697d4e8069b4ab93364487d9e 100644 |
| --- a/cc/trees/property_tree_builder.cc |
| +++ b/cc/trees/property_tree_builder.cc |
| @@ -56,6 +56,7 @@ struct DataForRecursion { |
| const gfx::Transform* device_transform; |
| gfx::Transform compound_transform_since_render_target; |
| bool axis_align_since_render_target; |
| + bool not_axis_aligned_since_last_clip; |
| SkColor safe_opaque_background_color; |
| }; |
| @@ -891,8 +892,19 @@ bool AddEffectNodeIfNeeded( |
| data_for_children->axis_align_since_render_target &= |
| AnimationsPreserveAxisAlignment(layer); |
| + bool not_axis_aligned_since_last_clip = |
| + data_from_ancestor.not_axis_aligned_since_last_clip |
| + ? true |
| + : !AnimationsPreserveAxisAlignment(layer) || |
| + !Transform(layer).Preserves2dAxisAlignment(); |
|
chrishtr
2017/05/16 23:36:42
What about transforms that don't have effects?
jaydasika
2017/05/16 23:46:28
The recursion variable not_axis_aligned_since_last
chrishtr
2017/05/17 00:44:49
Oh I see. AddEffectNodeIfNeeded is called uncondit
jaydasika
2017/05/17 21:20:46
The reason I put it here is to avoid duplicating t
|
| + bool has_non_axis_aligned_clip = |
| + not_axis_aligned_since_last_clip && LayerClipsSubtree(layer); |
| + data_for_children->not_axis_aligned_since_last_clip = |
| + !has_non_axis_aligned_clip; |
| + |
| bool requires_node = is_root || has_transparency || |
| has_potential_opacity_animation || has_proxied_opacity || |
| + has_non_axis_aligned_clip || |
| should_create_render_surface; |
| int parent_id = data_from_ancestor.effect_tree_parent; |
| @@ -1273,6 +1285,7 @@ void BuildPropertyTreesTopLevelInternal( |
| data_for_recursion.property_trees->clear(); |
| data_for_recursion.compound_transform_since_render_target = gfx::Transform(); |
| data_for_recursion.axis_align_since_render_target = true; |
| + data_for_recursion.not_axis_aligned_since_last_clip = false; |
| data_for_recursion.property_trees->transform_tree.set_device_scale_factor( |
| device_scale_factor); |
| data_for_recursion.safe_opaque_background_color = color; |