Index: Source/core/animation/Player.cpp |
diff --git a/Source/core/animation/Player.cpp b/Source/core/animation/Player.cpp |
index 79e796d4d653cd810d9f12eaaca62afd0ae948b6..1e0a5aedbba992c430c8bb593be89633c9da587f 100644 |
--- a/Source/core/animation/Player.cpp |
+++ b/Source/core/animation/Player.cpp |
@@ -92,7 +92,7 @@ double Player::currentTimeWithLag() const |
return std::isinf(time) ? time : time - m_storedTimeLag; |
} |
-void Player::updateTimingState(double newCurrentTime) |
+void Player::updateTimingState(double newCurrentTime, bool shouldSetOutdated) |
{ |
ASSERT(!isNull(newCurrentTime)); |
m_held = m_paused || !m_playbackRate || limited(newCurrentTime); |
@@ -103,15 +103,16 @@ void Player::updateTimingState(double newCurrentTime) |
m_holdTime = nullValue(); |
m_storedTimeLag = currentTimeWithoutLag() - newCurrentTime; |
} |
- setOutdated(); |
+ if (shouldSetOutdated) |
dstockwell
2014/02/24 07:44:07
Shouldn't we be able to derive this from above? Ch
Timothy Loh
2014/03/04 03:13:07
Ok this ends up being a little more complicated be
|
+ setOutdated(); |
} |
-void Player::updateCurrentTimingState() |
+void Player::updateCurrentTimingState(bool shouldSetOutdated) |
{ |
if (m_held) { |
- updateTimingState(m_holdTime); |
+ updateTimingState(m_holdTime, shouldSetOutdated); |
} else { |
- updateTimingState(currentTimeWithLag()); |
+ updateTimingState(currentTimeWithLag(), shouldSetOutdated); |
if (m_held && limited(m_holdTime)) |
m_holdTime = m_playbackRate < 0 ? 0 : sourceEnd(); |
} |
@@ -119,7 +120,7 @@ void Player::updateCurrentTimingState() |
double Player::currentTime() |
{ |
- updateCurrentTimingState(); |
+ updateCurrentTimingState(false); |
if (m_held) |
return m_holdTime; |
return currentTimeWithLag(); |
@@ -261,15 +262,12 @@ void Player::cancelAnimationOnCompositor() |
bool Player::update() |
{ |
- if (!m_timeline) |
- return false; |
- |
- double inheritedTime = isNull(m_timeline->currentTime()) ? nullValue() : currentTime(); |
m_outdated = false; |
- if (!m_content) |
+ if (!m_timeline || !m_content) |
return false; |
+ double inheritedTime = isNull(m_timeline->currentTime()) ? nullValue() : currentTime(); |
m_content->updateInheritedTime(inheritedTime); |
ASSERT(!m_outdated); |