mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 15:02:11 +00:00
Bug 958758. If we need to re-decode an image with different flags and shutting down the existing decoder has caused us to finish decoding we need to discard the image so we can create a new decoder with the new flags. r=seth
This commit is contained in:
parent
674998ae98
commit
e1d75aac97
@ -2374,6 +2374,15 @@ RasterImage::SyncDecode()
|
||||
if (mDecoder && mDecoder->GetDecodeFlags() != mFrameDecodeFlags) {
|
||||
nsresult rv = FinishedSomeDecoding(eShutdownIntent_NotNeeded);
|
||||
CONTAINER_ENSURE_SUCCESS(rv);
|
||||
|
||||
if (mDecoded) {
|
||||
// If we've finished decoding we need to discard so we can re-decode
|
||||
// with the new flags. If we can't discard then there isn't
|
||||
// anything we can do.
|
||||
if (!CanForciblyDiscard() || mDecoder || mAnim)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
ForceDiscard();
|
||||
}
|
||||
}
|
||||
|
||||
// If we're currently waiting on a new frame for this image, we have to create
|
||||
|
Loading…
x
Reference in New Issue
Block a user