Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| index d6169b58aeebc72104ed8a14f883ad644a14f644..1aa1b93c3ae2e61f757a6486f695e61293e709e5 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| +++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h |
| @@ -301,6 +301,16 @@ class PLATFORM_EXPORT ImageDecoder { |
| // returns that number. |
| virtual size_t decodeFrameCount() { return 1; } |
| + // Called to initialize the frame buffer with the given index, based on the |
| + // provided and previous frame's characteristics. Returns true on success. On |
| + // failure, this will mark the image as failed. Before calling this method, |
| + // the callee must verify that the frame exists. |
|
scroggo_chromium
2016/11/14 13:51:45
caller*
joostouwerling
2016/11/14 16:25:09
Done.
|
| + virtual bool initFrameBuffer(size_t); |
| + |
| + // Called by initFrameBuffer to determine if it can take the bitmap of the |
| + // previous frame. This condition is different for GIF and WEBP. |
| + virtual bool canReusePreviousFrameBuffer(size_t) const { return false; } |
|
scroggo_chromium
2016/11/14 13:51:45
This one doesn't actually need to be virtual. We n
joostouwerling
2016/11/14 16:25:09
For only GIF and WebP, this would be fine, but for
|
| + |
| // Performs any additional setup of the requested frame after it has been |
| // initially created, e.g. setting a duration or disposal method. |
| virtual void initializeNewFrame(size_t) {} |