mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1363830 - use previous frame time when advancing animations, r=kats
MozReview-Commit-ID: CqKOguZXnF9 --HG-- extra : rebase_source : b1ba85d20978fe5e7853a07065df7e3626c4a482
This commit is contained in:
parent
4b9801e41b
commit
84df6e8c7e
@ -1053,7 +1053,16 @@ WebRenderBridgeParent::AdvanceAnimations()
|
||||
if (CompositorBridgeParent* cbp = GetRootCompositorBridgeParent()) {
|
||||
animTime = cbp->GetTestingTimeStamp().valueOr(animTime);
|
||||
}
|
||||
AnimationHelper::SampleAnimations(mAnimStorage, animTime);
|
||||
|
||||
AnimationHelper::SampleAnimations(mAnimStorage,
|
||||
!mPreviousFrameTimeStamp.IsNull() ?
|
||||
mPreviousFrameTimeStamp : 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();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -281,6 +281,7 @@ private:
|
||||
nsDataHashtable<nsUint64HashKey, RefPtr<WebRenderImageHost>> mExternalImageIds;
|
||||
nsTArray<ImageCompositeNotificationInfo> mImageCompositeNotifications;
|
||||
|
||||
TimeStamp mPreviousFrameTimeStamp;
|
||||
// These fields keep track of the latest layer observer epoch values in the child and the
|
||||
// parent. mChildLayerObserverEpoch is the latest epoch value received from the child.
|
||||
// mParentLayerObserverEpoch is the latest epoch value that we have told TabParent about
|
||||
|
Loading…
Reference in New Issue
Block a user