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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp

Issue 2766263002: Refactor PNGImageDecoder's call to setSize (Closed)
Patch Set: Single return statement 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 | « third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
index ccfd5fcd211ba2571fc51718cd0fef3552fc1dc9..38c76056bc866db107e2fdfb8f692f3d009ab334 100644
--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageReader.cpp
@@ -534,6 +534,9 @@ bool PNGImageReader::parseSize(const FastSharedBufferReader& reader) {
m_isAnimated = false;
if (!m_isAnimated || 1 == m_reportedFrameCount)
m_decoder->setRepetitionCount(cAnimationNone);
+ if (!m_decoder->setSize(m_width, m_height))
+ return false;
+ m_decoder->setColorSpace();
m_decoder->headerAvailable();
return true;
}
« no previous file with comments | « third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698