mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 811891. Only sync decode once per image. r=joe
Bug 799335 intentionally caused us to do some decoding everytime StartDecoding is called. This can be multiple times per paint which can delay tab switch substantially. --HG-- extra : rebase_source : d3f151e85c142984c39f21ff7e13d1d37d39a4bf
This commit is contained in:
parent
c1de083ea9
commit
87d9a43558
@ -2722,13 +2722,9 @@ RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
|
||||
if (!StoringSourceData())
|
||||
return NS_OK;
|
||||
|
||||
// If we've already got a full decoder running, we'll spend a bit of time
|
||||
// decoding because the caller want's an image soon.
|
||||
if (mDecoder && !mDecoder->IsSizeDecode()) {
|
||||
if (!mDecoded && !mInDecoder && mHasSourceData && aDecodeType == SOMEWHAT_SYNCHRONOUS) {
|
||||
SAMPLE_LABEL_PRINTF("RasterImage", "DecodeABitOf", "%s", GetURIString());
|
||||
DecodeWorker::Singleton()->DecodeABitOf(this);
|
||||
}
|
||||
// If we've already got a full decoder running, and have already
|
||||
// decoded some bytes, we have nothing to do
|
||||
if (mDecoder && !mDecoder->IsSizeDecode() && mBytesDecoded) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user