Bug 1368440. Drop the layerized version of animated images when they are discarded so we don't show an out of date version of the image. r=aosmond

This commit is contained in:
Timothy Nikkel 2017-06-06 00:41:40 -05:00
Родитель c1c59ec073
Коммит 9ddfa24f9c
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -471,6 +471,7 @@ RasterImage::OnSurfaceDiscardedInternal(bool aAnimatedFramesDiscarded)
if (aAnimatedFramesDiscarded && mAnimationState) {
MOZ_ASSERT(gfxPrefs::ImageMemAnimatedDiscardable());
mImageContainer = nullptr;
gfx::IntRect rect =
mAnimationState->UpdateState(mAnimationFinished, this, mSize);
NotifyProgress(NoProgress, rect);
@ -1086,6 +1087,7 @@ RasterImage::Discard()
SurfaceCache::RemoveImage(ImageKey(this));
if (mAnimationState) {
mImageContainer = nullptr;
gfx::IntRect rect =
mAnimationState->UpdateState(mAnimationFinished, this, mSize);
NotifyProgress(NoProgress, rect);