Index: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
index 8a3b219e91213d6ac4c1ec1b2f7388b898b32ba3..f1bbef96ff542b5e4a04df08a2ca0809580a28a5 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
+++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
@@ -457,14 +457,14 @@ bool WEBPImageDecoder::decodeSingleFrame(const uint8_t* dataBytes, |
DCHECK_NE(buffer.getStatus(), ImageFrame::FrameComplete); |
if (buffer.getStatus() == ImageFrame::FrameEmpty) { |
- if (!buffer.setSizeAndColorSpace(size().width(), size().height(), |
- colorSpaceForSkImages())) |
+ if (!buffer.allocatePixelData(size().width(), size().height(), |
+ colorSpaceForSkImages())) |
return setFailed(); |
- buffer.setStatus(ImageFrame::FramePartial); |
+ buffer.zeroFillPixelData(); |
// The buffer is transparent outside the decoded area while the image is |
scroggo_chromium
2017/03/17 14:36:38
Similarly, this comment seems to apply to the line
cblume
2017/03/17 18:05:46
Done.
|
// loading. The correct alpha value for the frame will be set when it is |
// fully decoded. |
- buffer.setHasAlpha(true); |
+ buffer.setStatus(ImageFrame::FramePartial); |
buffer.setOriginalFrameRect(IntRect(IntPoint(), size())); |
} |