Bug 1455315 - Use testing time stamp whenever we are on testing mode. r?kats
MozReview-Commit-ID: 6IgsYt40KiX
--- 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();
}