Enable downscale of very large images when uploading on IO thread (flutter/engine#5011)

This commit is contained in:
Brian Osman
2018-04-18 21:00:00 -04:00
committed by Chinmay Garde
parent 326b317633
commit ebb33d946a

View File

@@ -63,7 +63,7 @@ static sk_sp<SkImage> DecodeImage(fml::WeakPtr<GrContext> context,
// This indicates that we do not want a "linear blending" decode.
sk_sp<SkColorSpace> dstColorSpace = nullptr;
return SkImage::MakeCrossContextFromEncoded(
context.get(), std::move(buffer), false, dstColorSpace.get());
context.get(), std::move(buffer), false, dstColorSpace.get(), true);
} else {
// Defer decoding until time of draw later on the GPU thread. Can happen
// when GL operations are currently forbidden such as in the background