Commit 20b52623 authored by Kevin Ellis's avatar Kevin Ellis Committed by Commit Bot

Remove Animation::NeedsCompositorTimeSync

This small patch is part of a cleanup effort to remove remaining
references to the internal_play_state_ data member in animation.cc.
Now that the timing of the pending flag resets has been fixed, the
use of old AnimationPlayState::kPending is no longer required.

Bug: 960944
Change-Id: I2e86184c10dcacc8bf2f62a3a7410948c16b5bd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1933748Reviewed-by: default avatarMajid Valipour <majidvp@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718839}
parent 3712c2ac
...@@ -156,14 +156,6 @@ class CORE_EXPORT Animation : public EventTargetWithInlineData, ...@@ -156,14 +156,6 @@ class CORE_EXPORT Animation : public EventTargetWithInlineData,
!is_paused_for_testing_; !is_paused_for_testing_;
} }
// Indicates if the animation is out of sync with the compositor. A change to
// the play state (running/paused) requires synchronization with the
// compositor.
bool NeedsCompositorTimeSync() const {
// TODO(crbug.com/958433): Eliminate need for pending play state.
return internal_play_state_ == kPending;
}
bool Limited() const { return Limited(CurrentTimeInternal()); } bool Limited() const { return Limited(CurrentTimeInternal()); }
bool FinishedInternal() const { return finished_; } bool FinishedInternal() const { return finished_; }
......
...@@ -74,7 +74,7 @@ bool ConsiderAnimationAsIncompatible(const Animation& animation, ...@@ -74,7 +74,7 @@ bool ConsiderAnimationAsIncompatible(const Animation& animation,
if (&animation == &animation_to_add) if (&animation == &animation_to_add)
return false; return false;
if (animation.NeedsCompositorTimeSync()) if (animation.pending())
return true; return true;
switch (animation.CalculateAnimationPlayState()) { switch (animation.CalculateAnimationPlayState()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment