Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h

Issue 2749703002: Refactor ImageFrame::setSizeAndColorSpace() (Closed)
Patch Set: Moving to another CR the separation of zeroing pixel data from setting alpha Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698