mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 683290: Make RasterImage::GetFrame actually honor the flags it is passed. r=bholley
This commit is contained in:
parent
de5c7e5bdc
commit
a0231db826
@ -683,10 +683,12 @@ RasterImage::GetFrame(PRUint32 aWhichFrame,
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
PRUint32 desiredDecodeFlags = aFlags & DECODE_FLAGS_MASK;
|
||||
|
||||
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
|
||||
@ -697,11 +699,11 @@ RasterImage::GetFrame(PRUint32 aWhichFrame,
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
ForceDiscard();
|
||||
|
||||
mFrameDecodeFlags = desiredDecodeFlags;
|
||||
}
|
||||
}
|
||||
|
||||
mFrameDecodeFlags = desiredDecodeFlags;
|
||||
|
||||
// If the caller requested a synchronous decode, do it
|
||||
if (aFlags & FLAG_SYNC_DECODE) {
|
||||
rv = SyncDecode();
|
||||
|
Loading…
Reference in New Issue
Block a user