Chromium Code Reviews| 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 fae908a78e567ec303b4b967a767735cffe0861c..b26960203d042666f595674f05a7e2b8be25b5f8 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
| +++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
| @@ -166,14 +166,14 @@ int WEBPImageDecoder::repetitionCount() const |
| return failed() ? cAnimationLoopOnce : m_repetitionCount; |
| } |
| -bool WEBPImageDecoder::frameIsCompleteAtIndex(size_t index) const |
| +bool WEBPImageDecoder::frameIsFullyReceivedAtIndex(size_t index) const |
| { |
| - if (!m_demux || m_demuxState <= WEBP_DEMUX_PARSING_HEADER) |
| - return false; |
| if (!(m_formatFlags & ANIMATION_FLAG)) |
| - return ImageDecoder::frameIsCompleteAtIndex(index); |
| - bool frameIsLoadedAtIndex = index < m_frameBufferCache.size(); |
| - return frameIsLoadedAtIndex; |
| + return ImageDecoder::frameIsFullyReceivedAtIndex(index); |
| + |
| + // Multi-frame WebP frame gets added to m_frameBufferCache through |
| + // initializeNewFrame() only when the frame data is fully received. |
|
Peter Kasting
2016/05/25 01:05:23
Really? That's not what it looks like to me. m_f
aleksandar.stojiljkovic
2016/05/30 16:12:20
Yes, it is like that. I could work on documenting
Peter Kasting
2016/05/31 03:46:42
That looks to me like a bug in the webp decoder, h
scroggo_chromium
2016/06/01 15:11:25
AFAICT, the GIF decoder does not know its frame co
Peter Kasting
2016/06/01 15:23:49
Huh. I was misled by the way there's a separate f
|
| + return index < m_frameBufferCache.size(); |
| } |
| float WEBPImageDecoder::frameDurationAtIndex(size_t index) const |