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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review #23 fix - comments. cleanup. Thanks Leon. 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/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index 7da3b9beaf524831f080a8816321202214490092..cd89099903a7a57433648ce39e91e4e9befdea45 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -161,6 +161,12 @@ public:
return !m_failed && m_sizeAvailable;
}
+ // Whether the requested frame is fully decoded.
+ inline bool frameIsCompleteAtIndex(size_t frameIndex) const
+ {
+ return (frameIndex < m_frameBufferCache.size()) && (m_frameBufferCache[frameIndex].getStatus() == ImageFrame::FrameComplete);
+ }
+
virtual IntSize size() const { return m_size; }
// Decoders which downsample images should override this method to
@@ -220,7 +226,7 @@ public:
virtual bool frameHasAlphaAtIndex(size_t) const;
// Whether or not the frame is fully received.
- virtual bool frameIsCompleteAtIndex(size_t) const;
+ virtual bool frameIsFullyReceivedAtIndex(size_t) const;
// Duration for displaying a frame in seconds. This method is only used by
// animated images.

Powered by Google App Engine
This is Rietveld 408576698