Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp

Issue 2944423003: Implement new AnimationTimeline superclass (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
index 4d6db0bb5a1eaf8bd0f1d551797fc31bfdc3d9ef..265a18d4c047f9bdbf6c484ac7b14e48559ec02b 100644
--- a/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorPendingAnimations.cpp
@@ -44,7 +44,7 @@ void CompositorPendingAnimations::Add(Animation* animation) {
DCHECK_EQ(pending_.Find(animation), kNotFound);
pending_.push_back(animation);
- Document* document = animation->timeline()->GetDocument();
+ Document* document = animation->TimelineInternal()->GetDocument();
if (document->View())
document->View()->ScheduleAnimation();
@@ -84,7 +84,8 @@ bool CompositorPendingAnimations::Update(
}
if (animation->Playing() && !animation->HasStartTime() &&
- animation->timeline() && animation->timeline()->IsActive()) {
+ animation->TimelineInternal() &&
+ animation->TimelineInternal()->IsActive()) {
waiting_for_start_time.push_back(animation.Get());
}
} else {
@@ -105,14 +106,14 @@ bool CompositorPendingAnimations::Update(
for (auto& animation : waiting_for_start_time) {
if (!animation->HasStartTime()) {
animation->NotifyCompositorStartTime(
- animation->timeline()->CurrentTimeInternal());
+ animation->TimelineInternal()->CurrentTimeInternal());
}
}
}
// FIXME: The postCommit should happen *after* the commit, not before.
for (auto& animation : animations)
- animation->PostCommit(animation->timeline()->CurrentTimeInternal());
+ animation->PostCommit(animation->TimelineInternal()->CurrentTimeInternal());
DCHECK(pending_.IsEmpty());
DCHECK(start_on_compositor || deferred.IsEmpty());
@@ -150,7 +151,8 @@ void CompositorPendingAnimations::NotifyCompositorAnimationStarted(
for (auto animation : animations) {
if (animation->HasStartTime() ||
animation->PlayStateInternal() != Animation::kPending ||
- !animation->timeline() || !animation->timeline()->IsActive()) {
+ !animation->TimelineInternal() ||
+ !animation->TimelineInternal()->IsActive()) {
// Already started or no longer relevant.
continue;
}
@@ -159,8 +161,9 @@ void CompositorPendingAnimations::NotifyCompositorAnimationStarted(
waiting_for_compositor_animation_start_.push_back(animation);
continue;
}
- animation->NotifyCompositorStartTime(monotonic_animation_start_time -
- animation->timeline()->ZeroTime());
+ animation->NotifyCompositorStartTime(
+ monotonic_animation_start_time -
+ animation->TimelineInternal()->ZeroTime());
}
}
« no previous file with comments | « third_party/WebKit/Source/core/animation/BUILD.gn ('k') | third_party/WebKit/Source/core/animation/DocumentTimeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698