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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h

Issue 2495183002: Pull up initFrameBuffer to ImageDecoder. (Closed)
Patch Set: Make ImageDecoder::initFrameBuffer const-correct. Created 4 years, 1 month 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: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h
index 1987dfcf306d75878c83a6487451f608b9ad3f5c..85151371244dd55c150b8dc6e8cdcac521e52b7f 100644
--- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h
@@ -82,10 +82,16 @@ class PLATFORM_EXPORT GIFImageDecoder final : public ImageDecoder {
// data. If parsing fails, sets the "decode failure" flag.
void parse(GIFParseQuery);
- // Called to initialize the frame buffer with the given index, based on
- // the previous frame's disposal method. Returns true on success. On
- // failure, this will mark the image as failed.
- bool initFrameBuffer(size_t frameIndex);
+ // In addition to ImageDecoder::initFrameBuffer, also reset the alpha tracker
+ // for this frame. Before calling this method, the callee must verify that
scroggo_chromium 2016/11/14 13:51:46 caller*
joostouwerling 2016/11/14 16:25:10 Done.
+ // the frame exists.
+ bool initFrameBuffer(size_t) override;
+
+ // When the disposal method of the frame is DisposeOverWritePrevious, the
+ // next frame will use the previous frame's buffer as its starting state, so
+ // we can't take over the data in that case. Before calling this method, the
+ // callee must verify that the frame exists.
scroggo_chromium 2016/11/14 13:51:46 caller*
joostouwerling 2016/11/14 16:25:10 Done.
+ bool canReusePreviousFrameBuffer(size_t) const override;
// Like clearCacheExceptFrame(), but preserves two frames instead of one.
size_t clearCacheExceptTwoFrames(size_t, size_t);

Powered by Google App Engine
This is Rietveld 408576698