mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1180931 (Part 2) - Allow sync size decoding for transient (i.e. multipart) images. r=tn
This commit is contained in:
parent
56fb1f882b
commit
b06a873fb7
@ -1196,10 +1196,11 @@ RasterImage::OnImageDataComplete(nsIRequest*, nsISupports*, nsresult aStatus,
|
||||
// Let decoders know that there won't be any more data coming.
|
||||
mSourceBuffer->Complete(aStatus);
|
||||
|
||||
// Do a synchronous size decode if mSyncLoad was set, or if we're running on a
|
||||
// single thread (in which case waiting for the async size decoder could delay
|
||||
// this image's load event quite a bit).
|
||||
bool canSyncSizeDecode = mSyncLoad || DecodePool::NumberOfCores() < 2;
|
||||
// Allow a synchronous size decode if mSyncLoad was set, or if we're running
|
||||
// on a single thread (in which case waiting for the async size decoder could
|
||||
// delay this image's load event quite a bit), or if this image is transient.
|
||||
bool canSyncSizeDecode = mSyncLoad || mTransient ||
|
||||
DecodePool::NumberOfCores() < 2;
|
||||
|
||||
if (canSyncSizeDecode && !mHasSize) {
|
||||
// We're loading this image synchronously, so it needs to be usable after
|
||||
|
Loading…
Reference in New Issue
Block a user