mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge from inbound
This commit is contained in:
commit
a0055a5c14
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user