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

Unified Diff: Source/core/svg/animation/SMILTimeContainer.cpp

Issue 198723005: Use the Document AnimationClock in SMILTimeContainer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/animation/SMILTimeContainer.cpp
diff --git a/Source/core/svg/animation/SMILTimeContainer.cpp b/Source/core/svg/animation/SMILTimeContainer.cpp
index 6cd7a4ca82faa49833e3f21a3cb9a28939d5b598..4f06346923daa744eeb761c988ea991a6381a783 100644
--- a/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -57,7 +57,6 @@ SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner)
, m_presetStartTime(0)
, m_frameSchedulingState(Idle)
, m_documentOrderIndexesDirty(false)
- , m_animationClock(AnimationClock::create())
, m_wakeupTimer(this, &SMILTimeContainer::wakeupTimerFired)
, m_ownerSVGElement(owner)
#ifndef NDEBUG
@@ -241,7 +240,6 @@ void SMILTimeContainer::setElapsed(SMILTime time)
m_preventScheduledAnimationsChanges = false;
#endif
- DiscardScope discardScope(m_ownerSVGElement);
updateAnimationsAndScheduleFrameIfNeeded(time, true);
}
@@ -285,7 +283,6 @@ void SMILTimeContainer::wakeupTimerFired(Timer<SMILTimeContainer>*)
serviceOnNextFrame();
} else {
m_frameSchedulingState = Idle;
- DiscardScope discardScope(m_ownerSVGElement);
updateAnimationsAndScheduleFrameIfNeeded(elapsed());
}
}
@@ -320,15 +317,9 @@ Document& SMILTimeContainer::document() const
return m_ownerSVGElement.document();
}
-AnimationClock& SMILTimeContainer::animationClock() const
-{
- ASSERT(m_animationClock);
- return *m_animationClock;
-}
-
double SMILTimeContainer::currentTime() const
{
- return animationClock().currentTime();
+ return document().animationClock().currentTime();
}
void SMILTimeContainer::serviceOnNextFrame()
@@ -345,14 +336,12 @@ void SMILTimeContainer::serviceAnimations(double monotonicAnimationStartTime)
return;
m_frameSchedulingState = Idle;
- animationClock().updateTime(monotonicAnimationStartTime);
- DiscardScope discardScope(m_ownerSVGElement);
updateAnimationsAndScheduleFrameIfNeeded(elapsed());
- animationClock().unfreeze();
}
void SMILTimeContainer::updateAnimationsAndScheduleFrameIfNeeded(SMILTime elapsed, bool seekToTime)
{
+ DiscardScope discardScope(m_ownerSVGElement);
SMILTime earliestFireTime = updateAnimations(elapsed, seekToTime);
// If updateAnimations() ended up triggering a synchronization (most likely
// via syncbases), then give that priority.
« no previous file with comments | « Source/core/svg/animation/SMILTimeContainer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698