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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h

Issue 2495183002: Pull up initFrameBuffer to ImageDecoder. (Closed)
Patch Set: Solved merge conflict with crrev.com/2494363002 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..fde848af48feec88df6327db774f49fb8f0a0c52 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,17 @@ class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder {
void readColorProfile();
bool updateDemuxer();
- bool initFrameBuffer(size_t frameIndex);
+
+ // Set |m_frameBackgroundHasAlpha| based on this frame's characteristics.
+ // Before calling this method, the caller must verify that the frame exists.
+ void onInitFrameBuffer(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 caller must verify that the frame exists.
+ 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