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

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

Issue 15350006: Decode GIF image frames on demand. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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: 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..aabf8c7350d6e99c7add741b54a1f12d424d4582 100644
--- a/Source/core/platform/image-decoders/gif/GIFImageReader.h
+++ b/Source/core/platform/image-decoders/gif/GIFImageReader.h
@@ -239,7 +239,7 @@ public:
, m_globalColormapPosition(0)
, m_globalColormapSize(0)
, m_loopCount(cLoopCountNotSeen)
- , m_currentDecodingFrame(0)
+ , m_decodedFramesCount(0)
, m_parseCompleted(false)
{
}
@@ -249,8 +249,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(const BitVector& frames);
Alpha Left Google 2013/05/18 00:39:35 Why not just give the index? User of this API (GIF
Xianzhu 2013/05/20 04:30:59 Done.
size_t imagesCount() const
{
@@ -290,7 +290,7 @@ public:
bool parseCompleted() const { return m_parseCompleted; }
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 +322,7 @@ 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;
+ size_t m_decodedFramesCount;
Alpha Left Google 2013/05/18 00:39:35 I don't think we need this any more. See my commen
Xianzhu 2013/05/20 04:30:59 Done.
RefPtr<WebCore::SharedBuffer> m_data;
bool m_parseCompleted;

Powered by Google App Engine
This is Rietveld 408576698