Bug 1455315 - Use testing time stamp whenever we are on testing mode. r=kats
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 20 Apr 2018 13:27:27 +0900
changeset 468200 b758bc75b0549db2d047539663c98f6f87ffd19b
parent 468199 d1bcd80c9a73a647a583958bef60816ae90d3d6b
child 468201 d7a44870dd575ed9f8ef2859a4a3450c96ebbd39
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1455315
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455315 - Use testing time stamp whenever we are on testing mode. r=kats MozReview-Commit-ID: 6IgsYt40KiX
gfx/layers/wr/WebRenderBridgeParent.cpp
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -1160,24 +1160,28 @@ void
 WebRenderBridgeParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   Destroy();
 }
 
 void
 WebRenderBridgeParent::AdvanceAnimations()
 {
-  TimeStamp animTime = mCompositorScheduler->GetLastComposeTime();
+  Maybe<TimeStamp> testingTimeStamp;
   if (CompositorBridgeParent* cbp = GetRootCompositorBridgeParent()) {
-    animTime = cbp->GetTestingTimeStamp().valueOr(animTime);
+    testingTimeStamp = cbp->GetTestingTimeStamp();
   }
 
-  AnimationHelper::SampleAnimations(mAnimStorage,
-                                    !mPreviousFrameTimeStamp.IsNull() ?
-                                    mPreviousFrameTimeStamp : animTime);
+  TimeStamp animTime = testingTimeStamp.valueOr(
+    !mPreviousFrameTimeStamp.IsNull()
+    ? mPreviousFrameTimeStamp
+    : mCompositorScheduler->GetLastComposeTime());
+
+
+  AnimationHelper::SampleAnimations(mAnimStorage, animTime);
 
   // Reset the previous time stamp if we don't already have any running
   // animations to avoid using the time which is far behind for newly
   // started animations.
   mPreviousFrameTimeStamp =
     mAnimStorage->AnimatedValueCount() ? animTime : TimeStamp();
 }