merge from inbound

This commit is contained in:
Jet Villegas 2013-01-28 11:00:30 -08:00
commit a0055a5c14
2 changed files with 4 additions and 13 deletions

View File

@ -24,7 +24,6 @@ Decoder::Decoder(RasterImage &aImage, imgDecoderObserver* aObserver)
, mSizeDecode(false)
, mInFrame(false)
, mIsAnimated(false)
, mFirstWrite(true)
{
}
@ -43,6 +42,10 @@ Decoder::Init()
// No re-initializing
NS_ABORT_IF_FALSE(!mInitialized, "Can't re-initialize a decoder!");
// Fire OnStartDecode at init time to support bug 512435.
if (!IsSizeDecode() && mObserver)
mObserver->OnStartDecode();
// Implementation-specific initialization
InitInternal();
mInitialized = true;
@ -56,9 +59,6 @@ Decoder::InitSharedDecoder()
// No re-initializing
NS_ABORT_IF_FALSE(!mInitialized, "Can't re-initialize a decoder!");
// Prevent duplicate notifications.
mFirstWrite = false;
// Implementation-specific initialization
InitInternal();
mInitialized = true;
@ -71,14 +71,6 @@ Decoder::Write(const char* aBuffer, uint32_t aCount)
NS_ABORT_IF_FALSE(!HasDecoderError(),
"Not allowed to make more decoder calls after error!");
// If this is our first write, fire OnStartDecode to support bug 512435.
if (mFirstWrite) {
if (!IsSizeDecode() && mObserver)
mObserver->OnStartDecode();
mFirstWrite = false;
}
// If a data error occured, just ignore future data
if (HasDataError())
return;

View File

@ -192,7 +192,6 @@ private:
bool mSizeDecode;
bool mInFrame;
bool mIsAnimated;
bool mFirstWrite;
};
} // namespace image