Bug 1000185 - Part 1: Perform synchronous SMIL sample after registering with refresh driver, not before, for consistency. r=birtles, a=abillings
authorDaniel Holbert <dholbert@cs.stanford.edu>
Tue, 20 May 2014 08:34:26 -0400
changeset 192343 542f83ec6345
parent 192342 50428e91f0bc
child 192344 cb78c3777143
push id3575
push userryanvm@gmail.com
push date2014-05-20 20:33 +0000
treeherdermozilla-beta@cb78c3777143 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles, abillings
bugs1000185
milestone30.0
Bug 1000185 - Part 1: Perform synchronous SMIL sample after registering with refresh driver, not before, for consistency. r=birtles, a=abillings
dom/smil/nsSMILAnimationController.cpp
--- a/dom/smil/nsSMILAnimationController.cpp
+++ b/dom/smil/nsSMILAnimationController.cpp
@@ -85,18 +85,18 @@ nsSMILAnimationController::Resume(uint32
   bool wasPaused = (mPauseState != 0);
   // Update mCurrentSampleTime so that calls to GetParentTime--used for
   // calculating parent offsets--are accurate
   mCurrentSampleTime = mozilla::TimeStamp::Now();
 
   nsSMILTimeContainer::Resume(aType);
 
   if (wasPaused && !mPauseState && mChildContainerTable.Count()) {
+    MaybeStartSampling(GetRefreshDriver());
     Sample(); // Run the first sample manually
-    MaybeStartSampling(GetRefreshDriver());
   }
 }
 
 nsSMILTime
 nsSMILAnimationController::GetParentTime() const
 {
   return (nsSMILTime)(mCurrentSampleTime - mStartTime).ToMilliseconds();
 }