Bug 1456679 - Update the previous timestamp with the current timestamp even if there are only delayed phase animations. r=kats
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 08 May 2018 15:58:54 +0900
changeset 471696 a7074da0c89cb90b7b488e540e52390cb1f0f34a
parent 471695 8e9fc4d911cfa88f81c05b741d96dad68bd5d3ce
child 471697 217999de6c8803fa536d6fc3428633bd6754f0c0
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1456679
milestone62.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 1456679 - Update the previous timestamp with the current timestamp even if there are only delayed phase animations. r=kats mAnimStorage->AnimatedValueCount() returns zero in the case where all animations are in delay phase, even in such case, we should update the previous timestamp. MozReview-Commit-ID: 5Dds1YjfVh9
gfx/layers/wr/WebRenderBridgeParent.cpp
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -1244,18 +1244,17 @@ WebRenderBridgeParent::AdvanceAnimations
   const bool isAnimating =
     AnimationHelper::SampleAnimations(mAnimStorage,
                                       mPreviousFrameTimeStamp,
                                       lastComposeTime);
 
   // 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() ? lastComposeTime : TimeStamp();
+  mPreviousFrameTimeStamp = isAnimating ? lastComposeTime : TimeStamp();
 
   return isAnimating;
 }
 
 bool
 WebRenderBridgeParent::SampleAnimations(nsTArray<wr::WrOpacityProperty>& aOpacityArray,
                                         nsTArray<wr::WrTransformProperty>& aTransformArray)
 {