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; |
}; |