Index: cc/animation/animation_player.cc |
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc |
index 196bad0a89e1c2ea2fe61c2c018c91dd7b924c67..01ba0125121d7c0dd4d38eb654514ebf9cb89755 100644 |
--- a/cc/animation/animation_player.cc |
+++ b/cc/animation/animation_player.cc |
@@ -9,6 +9,7 @@ |
#include "cc/animation/animation_delegate.h" |
#include "cc/animation/animation_host.h" |
#include "cc/animation/animation_timeline.h" |
+#include "cc/animation/property_animation_state.h" |
#include "cc/animation/scroll_offset_animation_curve.h" |
namespace cc { |
@@ -1010,6 +1011,26 @@ Animation* AnimationPlayer::GetAnimationById(int animation_id) const { |
return nullptr; |
} |
+void AnimationPlayer::GetPropertyAnimationStateFor( |
+ TargetProperty::Type property, |
+ PropertyAnimationState* state) const { |
+ state->Clear(); |
+ for (const auto& animation : animations_) { |
+ if (!animation->is_finished() && animation->target_property() == property) { |
+ state->potentially_animating_for_active_elements |= |
+ animation->affects_active_elements(); |
+ state->potentially_animating_for_pending_elements |= |
+ animation->affects_pending_elements(); |
+ state->currently_running_for_active_elements |= |
+ animation->affects_active_elements() && |
+ animation->InEffect(last_tick_time_); |
+ state->currently_running_for_pending_elements |= |
+ animation->affects_pending_elements() && |
+ animation->InEffect(last_tick_time_); |
+ } |
+ } |
+} |
+ |
void AnimationPlayer::MarkAbortedAnimationsForDeletion( |
AnimationPlayer* animation_player_impl) const { |
bool aborted_transform_animation = false; |