зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4f837919f3
Коммит
ed1618fa32
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче