Index: Source/core/platform/image-decoders/gif/GIFImageReader.h |
diff --git a/Source/core/platform/image-decoders/gif/GIFImageReader.h b/Source/core/platform/image-decoders/gif/GIFImageReader.h |
index 105cd655e692776bf219a260e57dd2e1ef61d0fa..1c64bffc8c1054f1627ad101a1f6c0699d66b190 100644 |
--- a/Source/core/platform/image-decoders/gif/GIFImageReader.h |
+++ b/Source/core/platform/image-decoders/gif/GIFImageReader.h |
@@ -213,7 +213,7 @@ public: |
datasize = size; |
m_isDataSizeDefined = true; |
} |
- |
+ void clearDecodeState() { m_lzwContext.clear(); } |
private: |
OwnPtr<GIFLZWContext> m_lzwContext; |
Vector<GIFLZWBlock> m_lzwBlocks; // LZW blocks for this frame. |
@@ -239,7 +239,6 @@ public: |
, m_globalColormapPosition(0) |
, m_globalColormapSize(0) |
, m_loopCount(cLoopCountNotSeen) |
- , m_currentDecodingFrame(0) |
, m_parseCompleted(false) |
{ |
} |
@@ -249,8 +248,8 @@ public: |
} |
void setData(PassRefPtr<WebCore::SharedBuffer> data) { m_data = data; } |
- // FIXME: haltAtFrame should be size_t. |
- bool decode(WebCore::GIFImageDecoder::GIFQuery, unsigned haltAtFrame); |
+ bool parse(WebCore::GIFImageDecoder::GIFParseQuery); |
+ bool decode(size_t frameIndex); |
Peter Kasting
2013/05/24 03:15:22
Thumbs up on improving the API here to be noticeab
|
size_t imagesCount() const |
{ |
@@ -289,8 +288,10 @@ public: |
bool parseCompleted() const { return m_parseCompleted; } |
+ void clearDecodeState(size_t index) { m_frames[index]->clearDecodeState(); } |
+ |
private: |
- bool parse(size_t dataPosition, size_t len, bool parseSizeOnly); |
+ bool parseData(size_t dataPosition, size_t len, WebCore::GIFImageDecoder::GIFParseQuery); |
void setRemainingBytes(size_t); |
const unsigned char* data(size_t dataPosition) const |
@@ -322,7 +323,6 @@ private: |
int m_loopCount; // Netscape specific extension block to control the number of animation loops a GIF renders. |
Vector<OwnPtr<GIFFrameContext> > m_frames; |
- size_t m_currentDecodingFrame; |
RefPtr<WebCore::SharedBuffer> m_data; |
bool m_parseCompleted; |