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

Unified Diff: Source/core/platform/image-decoders/gif/GIFImageDecoder.h

Issue 14317005: Checking if frame is complete and access duration doesn't need a decode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update frameIsCompleteAtIndex Created 7 years, 8 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: Source/core/platform/image-decoders/gif/GIFImageDecoder.h
diff --git a/Source/core/platform/image-decoders/gif/GIFImageDecoder.h b/Source/core/platform/image-decoders/gif/GIFImageDecoder.h
index a4728d33a7368d77431bcc7e24d721877af2999e..8768fde7538a95ceef0e9658b0109931c8a3c448 100644
--- a/Source/core/platform/image-decoders/gif/GIFImageDecoder.h
+++ b/Source/core/platform/image-decoders/gif/GIFImageDecoder.h
@@ -49,6 +49,8 @@ namespace WebCore {
virtual size_t frameCount();
virtual int repetitionCount() const;
virtual ImageFrame* frameBufferAtIndex(size_t index);
+ virtual bool frameIsCompleteAtIndex(size_t) const;
+ virtual float frameDurationAtIndex(size_t) const;
// CAUTION: setFailed() deletes |m_reader|. Be careful to avoid
// accessing deleted memory, especially when calling this from inside
// GIFImageReader!
@@ -72,6 +74,9 @@ namespace WebCore {
// failure, this will mark the image as failed.
bool initFrameBuffer(unsigned frameIndex);
+ // Return true only if the file is known to be truncated.
+ bool truncated() const;
+
bool m_currentBufferSawAlpha;
mutable int m_repetitionCount;
OwnPtr<GIFImageReader> m_reader;

Powered by Google App Engine
This is Rietveld 408576698