Bug 590252 - part 4 - Don't do progressive display on redecodes.r=joe,a=blocker

This commit is contained in:
Bobby Holley 2010-08-25 19:07:01 -04:00
parent f537275f66
commit 02d8f53c2f

View File

@ -2646,9 +2646,14 @@ imgDecodeWorker::Run()
}
// Flush invalidations _after_ we've written everything we're going to.
image->mInDecoder = PR_TRUE;
image->mDecoder->FlushInvalidations();
image->mInDecoder = PR_FALSE;
// Furthermore, if this is a redecode, we don't want to do progressive
// display at all. In that case, let Decoder::PostFrameStop() do the
// flush once the whole frame is ready.
if (!image->mHasBeenDecoded) {
image->mInDecoder = PR_TRUE;
image->mDecoder->FlushInvalidations();
image->mInDecoder = PR_FALSE;
}
// If the decode finished, shutdown the decoder
if (image->IsDecodeFinished()) {