Index: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp |
diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp |
index 66305823705374d2f65c7f70714b1807b514d9dd..24ddb61f5534a2525488cdb9bb07b12b29ee40a5 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp |
+++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp |
@@ -722,8 +722,12 @@ void term_source(j_decompress_ptr jd) { |
JPEGImageDecoder::JPEGImageDecoder(AlphaOption alphaOption, |
ColorSpaceOption colorOptions, |
+ sk_sp<SkColorSpace> targetColorSpace, |
size_t maxDecodedBytes) |
- : ImageDecoder(alphaOption, colorOptions, maxDecodedBytes) {} |
+ : ImageDecoder(alphaOption, |
+ colorOptions, |
+ std::move(targetColorSpace), |
+ maxDecodedBytes) {} |
JPEGImageDecoder::~JPEGImageDecoder() {} |
@@ -945,7 +949,7 @@ bool JPEGImageDecoder::outputScanlines() { |
static_cast<JDIMENSION>(m_decodedSize.height())); |
if (!buffer.setSizeAndColorSpace(info->output_width, info->output_height, |
- colorSpace())) |
+ colorSpaceForSkImages())) |
return setFailed(); |
// The buffer is transparent outside the decoded area while the image is |