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

Unified Diff: Source/core/animation/Player.cpp

Issue 28263002: Plumb timeToNextEffect through players and animation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved location of timeToEffectChange calculation Created 7 years, 2 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: Source/core/animation/Player.cpp
diff --git a/Source/core/animation/Player.cpp b/Source/core/animation/Player.cpp
index 0d44da78a694dae2ce567327b17c3158d961fe7b..9e6253666959e292129063c489b4e552f41f7c92 100644
--- a/Source/core/animation/Player.cpp
+++ b/Source/core/animation/Player.cpp
@@ -84,13 +84,18 @@ double Player::currentTime() const
return currentTimeBeforeDrift() - timeDrift();
}
-bool Player::update()
+bool Player::update(double* timeToEffectChange)
{
- if (!m_content)
+ if (!m_content) {
+ if (timeToEffectChange)
+ *timeToEffectChange = std::numeric_limits<double>::infinity();
return false;
+ }
double newTime = isNull(m_timeline->currentTime()) ? nullValue() : currentTime();
m_content->updateInheritedTime(newTime);
+ if (timeToEffectChange)
+ *timeToEffectChange = m_content->timeToEffectChange();
return m_content->isCurrent() || m_content->isInEffect();
}

Powered by Google App Engine
This is Rietveld 408576698