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

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

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert hasSeenAlpha approach in webp & png. bytebybyte unit tests. fixes. Created 4 years, 7 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
Index: third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
index 5f787b50ea0044779301c303903b7c7591902ef3..327831f298f4b28f194c1a0e4a42ab7d07d1f8d4 100644
--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -415,11 +415,6 @@ void PNGImageDecoder::complete()
m_frameBufferCache[0].setStatus(ImageFrame::FrameComplete);
}
-inline bool isComplete(const PNGImageDecoder* decoder)
-{
- return decoder->frameIsCompleteAtIndex(0);
-}
-
void PNGImageDecoder::decode(bool onlySize)
{
if (failed())
@@ -434,7 +429,7 @@ void PNGImageDecoder::decode(bool onlySize)
setFailed();
// If decoding is done or failed, we don't need the PNGImageReader anymore.
- if (isComplete(this) || failed())
+ if (frameIsCompleteAtIndex(0) || failed())
m_reader.clear();
}

Powered by Google App Engine
This is Rietveld 408576698