Bug 1100725 (Part 2) - Consume all the contained decoder's invalidations in nsICODecoder. r=tn

This commit is contained in:
Seth Fowler 2014-11-18 01:48:48 -08:00
parent 0b55b59c4e
commit 9b674c5a9b
2 changed files with 4 additions and 2 deletions

View File

@ -84,6 +84,7 @@ nsICODecoder::FinishInternal()
mContainedDecoder->FinishSharedDecoder();
mDecodeDone = mContainedDecoder->GetDecodeDone();
mProgress |= mContainedDecoder->GetProgress();
mInvalidRect.Union(mContainedDecoder->TakeInvalidRect());
}
}
@ -597,6 +598,7 @@ nsICODecoder::WriteToContainedDecoder(const char* aBuffer, uint32_t aCount,
{
mContainedDecoder->Write(aBuffer, aCount, aStrategy);
mProgress |= mContainedDecoder->GetProgress();
mInvalidRect.Union(mContainedDecoder->TakeInvalidRect());
if (mContainedDecoder->HasDataError()) {
mDataError = mContainedDecoder->HasDataError();
}
@ -642,6 +644,7 @@ nsICODecoder::AllocateFrame()
nsresult rv = mContainedDecoder->AllocateFrame();
mCurrentFrame = mContainedDecoder->GetCurrentFrame();
mProgress |= mContainedDecoder->GetProgress();
mInvalidRect.Union(mContainedDecoder->TakeInvalidRect());
return rv;
}

View File

@ -230,6 +230,7 @@ protected:
RasterImage &mImage;
nsRefPtr<imgFrame> mCurrentFrame;
ImageMetadata mImageMetadata;
nsIntRect mInvalidRect; // Tracks an invalidation region in the current frame.
Progress mProgress;
uint8_t* mImageData; // Pointer to image data in either Cairo or 8bit format
@ -245,8 +246,6 @@ protected:
private:
uint32_t mFrameCount; // Number of frames, including anything in-progress
nsIntRect mInvalidRect; // Tracks an invalidation region in the current frame.
nsresult mFailCode;
struct NewFrameData