Index: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
diff --git a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
index a99bb4680551e26e4936133969e7c44900430368..c4ef7da4e722d494d33e86a8fc2d74c8972b06da 100644 |
--- a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
+++ b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h |
@@ -111,8 +111,9 @@ class MockImageDecoder : public ImageDecoder { |
} |
void initializeNewFrame(size_t index) override { |
- m_frameBufferCache[index].setSizeAndColorSpace( |
- size().width(), size().height(), colorSpaceForSkImages()); |
+ if (m_frameBufferCache[index].allocatePixelData( |
+ size().width(), size().height(), colorSpaceForSkImages())) |
+ m_frameBufferCache[index].zeroFillPixelData(); |
m_frameBufferCache[index].setHasAlpha(false); |
} |