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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.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/webp/WEBPImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h
index 2800775cf773aeed9093fa784802505b7ba94530..7e64ddc707744aa2096c17674eff8d04ebf17a30 100644
--- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h
@@ -70,7 +70,18 @@ class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder {
void readColorProfile();
bool updateDemuxer();
- bool initFrameBuffer(size_t frameIndex);
+
+ // In addition to ImageDecoder::initFrameBuffer, also set
+ // |m_frameBackgroundHasAlpha| based on this frame's characteristics. 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 initFrameBuffer(size_t frameIndex) override;
+
+ // When the blending method of this frame is BlendAtopPreviousFrame, the
+ // previous frame's buffer is necessary to decode this frame in
+ // applyPostProcessing, so we can't take over the data. 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 frameIndex) const override;
+
void applyPostProcessing(size_t frameIndex);
void clearFrameBuffer(size_t frameIndex) override;

Powered by Google App Engine
This is Rietveld 408576698