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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extending the scope with naming suggested by @scroggo 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/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 2672862d85e13b5b65612075ffccf1ef424f6463..858f05c3b62cc628fb77aa8f56c3419d3cb7ad4e 100644
--- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp
@@ -165,12 +165,12 @@ int WEBPImageDecoder::repetitionCount() const
return failed() ? cAnimationLoopOnce : m_repetitionCount;
}
-bool WEBPImageDecoder::frameIsCompleteAtIndex(size_t index) const
+bool WEBPImageDecoder::frameIsFullyReceivedAtIndex(size_t index) const
Peter Kasting 2016/05/10 00:00:13 I'm not convinced this function is correct for fra
aleksandar.stojiljkovic 2016/05/10 21:59:31 I briefly checked WEBPImageDecoder::decodeFrameCo
scroggo_chromium 2016/05/11 15:17:34 As I understand it, GIF's version of frameIsFullyR
{
if (!m_demux || m_demuxState <= WEBP_DEMUX_PARSING_HEADER)
return false;
if (!(m_formatFlags & ANIMATION_FLAG))
- return ImageDecoder::frameIsCompleteAtIndex(index);
+ return ImageDecoder::frameIsFullyReceivedAtIndex(index);
bool frameIsLoadedAtIndex = index < m_frameBufferCache.size();
return frameIsLoadedAtIndex;
}
@@ -495,7 +495,7 @@ bool WEBPImageDecoder::decodeSingleFrame(const uint8_t* dataBytes, size_t dataSi
clearDecoder();
return true;
case VP8_STATUS_SUSPENDED:
- if (!isAllDataReceived() && !frameIsCompleteAtIndex(frameIndex)) {
+ if (!isAllDataReceived() && !frameIsFullyReceivedAtIndex(frameIndex)) {
applyPostProcessing(frameIndex);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698