Index: third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h |
diff --git a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h |
index 7ce6aa0faf83c7c6d2ece1ce6cc94ea5d07f7427..fb12ac0cb62037269817fa2c46be66fa7be47dce 100644 |
--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h |
+++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h |
@@ -45,6 +45,10 @@ class PLATFORM_EXPORT PNGImageDecoder final : public ImageDecoder { |
// ImageDecoder: |
String filenameExtension() const override { return "png"; } |
+ 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(); |
@@ -53,16 +57,17 @@ class PLATFORM_EXPORT PNGImageDecoder final : public ImageDecoder { |
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(); |
std::unique_ptr<PNGImageReader> m_reader; |
- const unsigned m_offset; |
+ const size_t m_offset; |
+ size_t m_currentFrame; |
}; |
} // namespace blink |