| Index: cc/trees/property_tree_builder.cc
|
| diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
|
| index 6b9f8e946527278603c1c4cab5cd5d5d4148a75d..f131fe8ec881c6112a7aa03d61cca195357d67d1 100644
|
| --- a/cc/trees/property_tree_builder.cc
|
| +++ b/cc/trees/property_tree_builder.cc
|
| @@ -615,7 +615,8 @@ static inline bool HasPotentialOpacityAnimation(Layer* layer) {
|
| }
|
|
|
| static inline bool HasPotentialOpacityAnimation(LayerImpl* layer) {
|
| - return layer->HasPotentiallyRunningOpacityAnimation();
|
| + return layer->HasPotentiallyRunningOpacityAnimation() ||
|
| + layer->test_properties()->opacity_can_animate;
|
| }
|
|
|
| static inline bool DoubleSided(Layer* layer) {
|
| @@ -662,8 +663,17 @@ static inline float EffectiveOpacity(Layer* layer) {
|
| }
|
|
|
| static inline float EffectiveOpacity(LayerImpl* layer) {
|
| - return layer->test_properties()->hide_layer_and_subtree ? 0.f
|
| - : layer->opacity();
|
| + return layer->test_properties()->hide_layer_and_subtree
|
| + ? 0.f
|
| + : layer->test_properties()->opacity;
|
| +}
|
| +
|
| +static inline float Opacity(Layer* layer) {
|
| + return layer->opacity();
|
| +}
|
| +
|
| +static inline float Opacity(LayerImpl* layer) {
|
| + return layer->test_properties()->opacity;
|
| }
|
|
|
| static inline bool HideLayerAndSubtree(Layer* layer) {
|
| @@ -846,7 +856,7 @@ bool AddEffectNodeIfNeeded(
|
| .push_back(node.owner_id);
|
| }
|
|
|
| - node.data.opacity = layer->opacity();
|
| + node.data.opacity = Opacity(layer);
|
| node.data.has_render_surface = should_create_render_surface;
|
| node.data.has_copy_request = HasCopyRequest(layer);
|
| node.data.has_background_filters = !layer->background_filters().IsEmpty();
|
|
|