Chromium Code Reviews| Index: cc/layers/layer.cc |
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
| index 92492afa97d7fdc4e30719125a8cb325a2227f81..f7af27d9e896ac1d68d0b2603beb49711dfb6a9b 100644 |
| --- a/cc/layers/layer.cc |
| +++ b/cc/layers/layer.cc |
| @@ -1667,6 +1667,30 @@ void Layer::OnTransformIsPotentiallyAnimatingChanged(bool is_animating) { |
| } |
| } |
| +void Layer::OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating) { |
| + DCHECK(layer_tree_host_); |
| + EffectTree& effect_tree = layer_tree_host_->property_trees()->effect_tree; |
| + EffectNode* node = effect_tree.Node(effect_tree_index()); |
| + if (!node) |
|
ajuma
2016/05/09 16:56:55
When does this happen? (That is, when does a layer
jaydasika
2016/05/10 20:22:29
In a lot of tests, almost all LayerTreeHostAnimati
ajuma
2016/05/10 20:46:20
Ah, this is on Layer, so it might be that we're ju
|
| + return; |
| + |
| + if (node->owner_id == id()) |
| + node->data.is_currently_animating_opacity = is_currently_animating; |
| +} |
| + |
| +void Layer::OnOpacityIsPotentiallyAnimatingChanged( |
| + bool has_potential_animation) { |
| + DCHECK(layer_tree_host_); |
| + EffectTree& effect_tree = layer_tree_host_->property_trees()->effect_tree; |
| + EffectNode* node = effect_tree.Node(effect_tree_index()); |
| + if (!node) |
| + return; |
| + if (node->owner_id == id()) { |
| + node->data.has_potential_opacity_animation = has_potential_animation; |
|
ajuma
2016/05/09 16:56:55
This also needs to take Layer::OpacityCanAnimateOn
jaydasika
2016/05/10 20:22:29
Done.
|
| + effect_tree.set_needs_update(true); |
| + } |
| +} |
| + |
| bool Layer::HasActiveAnimationForTesting() const { |
| return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this) |
| : false; |