diff options
Diffstat (limited to 'src/images/SkJpegUtility.h')
-rw-r--r-- | src/images/SkJpegUtility.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/images/SkJpegUtility.h b/src/images/SkJpegUtility.h index c84465289c..1a763f843c 100644 --- a/src/images/SkJpegUtility.h +++ b/src/images/SkJpegUtility.h @@ -10,6 +10,7 @@ #ifndef SkJpegUtility_DEFINED #define SkJpegUtility_DEFINED +#include "SkImageDecoder.h" #include "SkStream.h" extern "C" { @@ -29,6 +30,23 @@ struct skjpeg_error_mgr : jpeg_error_mgr { void skjpeg_error_exit(j_common_ptr cinfo); +/////////////////////////////////////////////////////////////////////////// +/* Our source struct for directing jpeg to our stream object. +*/ +struct skjpeg_source_mgr : jpeg_source_mgr { + skjpeg_source_mgr(SkStream* stream, SkImageDecoder* decoder); + + // Unowned. + SkStream* fStream; + // Unowned pointer to the decoder, used to check if the decoding process + // has been cancelled. + SkImageDecoder* fDecoder; + enum { + kBufferSize = 1024 + }; + char fBuffer[kBufferSize]; +}; + ///////////////////////////////////////////////////////////////////////////// /* Our destination struct for directing decompressed pixels to our stream * object. |