aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkJpegCodec.h
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2015-07-01 06:50:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-01 06:50:35 -0700
commitc0e80c139e15496a8a96eec7848689b6f0e7bcc1 (patch)
tree6c3fbc2df1ec557f196c4a0dde6a28989f95a43e /src/codec/SkJpegCodec.h
parentf06c389f0fe07ce06acd8568d508d6413b8d3728 (diff)
In the case of subset decodes, we will often not decode to
the bottom of the image. In our code before this patch, this would result in cleanup code in onFinish() never being called. We can allow subclasses to take ownership of the SkScanlineDecoder in order to make sure that it is finished/deleted before deleting the decode manager. BUG=skia: Review URL: https://codereview.chromium.org/1212593003
Diffstat (limited to 'src/codec/SkJpegCodec.h')
-rw-r--r--src/codec/SkJpegCodec.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h
index 87c925d9d1..f39bc49910 100644
--- a/src/codec/SkJpegCodec.h
+++ b/src/codec/SkJpegCodec.h
@@ -95,6 +95,12 @@ private:
SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* decoderMgr);
/*
+ * Explicit destructor is used to ensure that the scanline decoder is deleted
+ * before the decode manager.
+ */
+ ~SkJpegCodec() override;
+
+ /*
* Handles rewinding the input stream if it is necessary
*/
bool handleRewind();