mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 876332 - Set currentAnimationFrameTime correctly based on the current frame's timeout (not the next frame's timeout). r=jrmuizel
In AdvanceFrame(), timeout refers to the timeout of the *next* frame. Setting the *current* animation frame time based on the *next* frame is nonsense, but worked for images with uniform frame timings. Unfortunately some images don't have uniform frame timings!
This commit is contained in:
parent
74fe8b1dde
commit
3f2ad154cb
@ -616,19 +616,18 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
|
||||
// something went wrong, move on to next
|
||||
NS_WARNING("RasterImage::AdvanceFrame(): Compositing of frame failed");
|
||||
nextFrame->SetCompositingFailed(true);
|
||||
mAnim->currentAnimationFrameTime = GetCurrentImgFrameEndTime();
|
||||
mAnim->currentAnimationFrameIndex = nextFrameIndex;
|
||||
mAnim->currentAnimationFrameTime = mAnim->currentAnimationFrameTime +
|
||||
TimeDuration::FromMilliseconds(timeout);
|
||||
return false;
|
||||
}
|
||||
|
||||
nextFrame->SetCompositingFailed(false);
|
||||
}
|
||||
|
||||
mAnim->currentAnimationFrameTime = GetCurrentImgFrameEndTime();
|
||||
|
||||
// Set currentAnimationFrameIndex at the last possible moment
|
||||
mAnim->currentAnimationFrameIndex = nextFrameIndex;
|
||||
mAnim->currentAnimationFrameTime = mAnim->currentAnimationFrameTime +
|
||||
TimeDuration::FromMilliseconds(timeout);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user