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 b1a33d69e38866effd23650e3557a03cced75254..7819f84c79de1171077e3fd036c1787e15cfb99d 100644 |
| --- a/cc/trees/property_tree_builder.cc |
| +++ b/cc/trees/property_tree_builder.cc |
| @@ -10,6 +10,7 @@ |
| #include <set> |
| #include "cc/animation/animation_host.h" |
| +#include "cc/animation/mutable_properties.h" |
| #include "cc/base/math_util.h" |
| #include "cc/layers/layer.h" |
| #include "cc/layers/layer_impl.h" |
| @@ -498,6 +499,9 @@ bool AddTransformNodeIfNeeded( |
| const bool has_any_transform_animation = |
| HasAnyAnimationTargetingProperty(layer, TargetProperty::TRANSFORM); |
| + const bool has_proxied_transform_related_property = |
| + layer->mutable_properties() & MutableProperty::kTransformRelated; |
|
jaydasika
2016/08/17 02:38:43
Should this be && ?
Ian Vollick
2016/08/17 02:40:28
Ah, mutable_properties is a bitfield.
|
| + |
| const bool has_surface = created_render_surface; |
| // A transform node is needed to change the render target for subtree when |
| @@ -514,6 +518,7 @@ bool AddTransformNodeIfNeeded( |
| bool requires_node = is_root || is_scrollable || has_significant_transform || |
| has_any_transform_animation || has_surface || is_fixed || |
| is_page_scale_layer || is_overscroll_elasticity_layer || |
| + has_proxied_transform_related_property || |
| scroll_child_has_different_target || |
| is_at_boundary_of_3d_rendering_context; |
| @@ -941,6 +946,8 @@ bool AddEffectNodeIfNeeded( |
| HasPotentialOpacityAnimation(layer); |
| const bool has_potential_filter_animation = |
| HasPotentiallyRunningFilterAnimation(layer); |
| + const bool has_proxied_opacity = |
| + layer->mutable_properties() & MutableProperty::kOpacity; |
|
jaydasika
2016/08/17 02:38:43
same comment as above
|
| const bool should_create_render_surface = ShouldCreateRenderSurface( |
| layer, data_from_ancestor.compound_transform_since_render_target, |
| data_from_ancestor.axis_align_since_render_target); |
| @@ -948,7 +955,7 @@ bool AddEffectNodeIfNeeded( |
| AnimationsPreserveAxisAlignment(layer); |
| bool requires_node = is_root || has_transparency || |
| - has_potential_opacity_animation || |
| + has_potential_opacity_animation || has_proxied_opacity || |
| should_create_render_surface; |
| int parent_id = data_from_ancestor.effect_tree_parent; |