| 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 641012756bc353bc3cce7b30e28e29cc6acd17a1..a0278445f7355aec98e2dd230d6c9837877a67a5 100644
|
| --- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
|
| +++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
|
| @@ -937,10 +937,11 @@ bool JPEGImageDecoder::outputScanlines() {
|
| DCHECK_EQ(info->output_height,
|
| static_cast<JDIMENSION>(m_decodedSize.height()));
|
|
|
| - if (!buffer.setSizeAndColorSpace(info->output_width, info->output_height,
|
| - colorSpaceForSkImages()))
|
| + if (!buffer.allocatePixelData(info->output_width, info->output_height,
|
| + colorSpaceForSkImages()))
|
| return setFailed();
|
|
|
| + buffer.zeroFillPixelData();
|
| // The buffer is transparent outside the decoded area while the image is
|
| // loading. The image will be marked fully opaque in complete().
|
| buffer.setStatus(ImageFrame::FramePartial);
|
|
|