diff options
author | 2015-07-01 06:50:35 -0700 | |
---|---|---|
committer | 2015-07-01 06:50:35 -0700 | |
commit | c0e80c139e15496a8a96eec7848689b6f0e7bcc1 (patch) | |
tree | 6c3fbc2df1ec557f196c4a0dde6a28989f95a43e /src/codec/SkJpegCodec.h | |
parent | f06c389f0fe07ce06acd8568d508d6413b8d3728 (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.h | 6 |
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(); |