This commit is contained in:
Jet Villegas 2013-01-28 11:00:30 -08:00
Родитель a8297ad818 02254bb9cf
Коммит fb8a3f744d
2 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -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;

Просмотреть файл

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