Index: Source/platform/image-decoders/png/PNGImageDecoder.h |
diff --git a/Source/platform/image-decoders/png/PNGImageDecoder.h b/Source/platform/image-decoders/png/PNGImageDecoder.h |
index 7f54c2e360725981b96c9c96ce4cb6b331a77995..9ed6ebfc93d1d14dcb5b0d1cbed66dc8ffa8b197 100644 |
--- a/Source/platform/image-decoders/png/PNGImageDecoder.h |
+++ b/Source/platform/image-decoders/png/PNGImageDecoder.h |
@@ -43,6 +43,10 @@ public: |
// ImageDecoder: |
String filenameExtension() const override { return "png"; } |
bool hasColorProfile() const override { return m_hasColorProfile; } |
+ bool frameIsCompleteAtIndex(size_t) const override; |
+ float frameDurationAtIndex(size_t) const override; |
+ int repetitionCount() const override; |
+ size_t clearCacheExceptFrame(size_t) override; |
// Callbacks from libpng |
void headerAvailable(); |
@@ -51,16 +55,17 @@ public: |
private: |
// ImageDecoder: |
- void decodeSize() override { decode(true); } |
- void decode(size_t) override { decode(false); } |
+ void decodeSize() override { parse(); } |
+ void decode(size_t) override; |
+ size_t decodeFrameCount() override; |
+ void initializeNewFrame(size_t) override; |
- // Decodes the image. If |onlySize| is true, stops decoding after |
- // calculating the image size. If decoding fails but there is no more |
- // data coming, sets the "decode failure" flag. |
- void decode(bool onlySize); |
+ bool initFrameBuffer(); |
+ bool parse(); |
OwnPtr<PNGImageReader> m_reader; |
bool m_hasColorProfile; |
+ size_t m_currentFrame; |
}; |
} // namespace blink |