Bug 1455315 - Use testing time stamp whenever we are on testing mode. r=kats

MozReview-Commit-ID: 6IgsYt40KiX

--HG--
extra : rebase_source : ace1e52d42219c4ce23b663ca79a44bf30ab51d7
This commit is contained in:
Hiroyuki Ikezoe 2018-04-20 13:27:27 +09:00
Родитель 422559f898
Коммит 324a2c840a
1 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -1165,14 +1165,18 @@ WebRenderBridgeParent::ActorDestroy(ActorDestroyReason aWhy)
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