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

Unified Diff: src/codec/SkWebpCodec.h

Issue 2311793004: Use demux API in SkWebpCodec (Closed)
Patch Set: Fix test Created 4 years, 3 months 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: src/codec/SkWebpCodec.h
diff --git a/src/codec/SkWebpCodec.h b/src/codec/SkWebpCodec.h
index 6fda7c2824ff7cf09b942ba9839a9896cdfbb54f..b9c493f204682aaeea9ca077b6d84dcedaf9ce77 100644
--- a/src/codec/SkWebpCodec.h
+++ b/src/codec/SkWebpCodec.h
@@ -15,6 +15,10 @@
#include "SkTypes.h"
class SkStream;
+extern "C" {
+ struct WebPDemuxer;
+ void WebPDemuxDelete(WebPDemuxer* dmux);
+}
static const size_t WEBP_VP8_HEADER_SIZE = 30;
@@ -34,7 +38,14 @@ protected:
bool onGetValidSubset(SkIRect* /* desiredSubset */) const override;
private:
- SkWebpCodec(int width, int height, const SkEncodedInfo&, sk_sp<SkColorSpace>, SkStream*);
+ SkWebpCodec(int width, int height, const SkEncodedInfo&, sk_sp<SkColorSpace>, SkStream*,
+ WebPDemuxer*, sk_sp<SkData>);
+
+ SkAutoTCallVProc<WebPDemuxer, WebPDemuxDelete> fDemux;
+
+ // fDemux has a pointer into this data.
+ // This should not be freed until the decode is completed.
+ sk_sp<SkData> fData;
typedef SkCodec INHERITED;
};
« src/codec/SkCodec.cpp ('K') | « src/codec/SkCodec.cpp ('k') | src/codec/SkWebpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698