mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Backout f5c4aedd43a6 (bug 740841) for causing bug 742081.
This commit is contained in:
parent
0ce6ee8924
commit
807ffa9939
@ -880,21 +880,23 @@ RasterImage::GetFrame(PRUint32 aWhichFrame,
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// If we have decoded data, and it is not a perfect match for what we are
|
||||
// looking for, we must discard to be able to generate the proper data.
|
||||
PRUint32 desiredDecodeFlags = aFlags & DECODE_FLAGS_MASK;
|
||||
if (desiredDecodeFlags != mFrameDecodeFlags) {
|
||||
// if we can't discard, then we're screwed; we have no way
|
||||
// to re-decode. Similarly if we aren't allowed to do a sync
|
||||
// decode.
|
||||
if (!(aFlags & FLAG_SYNC_DECODE))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
if (!CanForciblyDiscard() || mDecoder || mAnim)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
ForceDiscard();
|
||||
|
||||
mFrameDecodeFlags = desiredDecodeFlags;
|
||||
if (mDecoded) {
|
||||
// If we have decoded data, and it is not a perfect match for what we are
|
||||
// looking for, we must discard to be able to generate the proper data.
|
||||
PRUint32 desiredDecodeFlags = aFlags & DECODE_FLAGS_MASK;
|
||||
if (desiredDecodeFlags != mFrameDecodeFlags) {
|
||||
// if we can't discard, then we're screwed; we have no way
|
||||
// to re-decode. Similarly if we aren't allowed to do a sync
|
||||
// decode.
|
||||
if (!(aFlags & FLAG_SYNC_DECODE))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
if (!CanForciblyDiscard() || mDecoder || mAnim)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
ForceDiscard();
|
||||
|
||||
mFrameDecodeFlags = desiredDecodeFlags;
|
||||
}
|
||||
}
|
||||
|
||||
// If the caller requested a synchronous decode, do it
|
||||
|
Loading…
Reference in New Issue
Block a user