diff options
author | cjbao <cathy.bao@intel.com> | 2017-05-22 23:40:36 +0800 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-05 14:57:46 +0000 |
commit | 96cc36124d06e023005dd901b32c59b29f55a135 (patch) | |
tree | a7b45bd876d3d22094be83a926fc5741f8bd778e /src/codec/SkJpegDecoderMgr.h | |
parent | 4b0b00e0c3eefd08057b7f713143df3b2a7cc911 (diff) |
Handle different types of streams in different jpeg source managers
For streams that are memory backed (stream->getMemoryBase() returns
a non-null ptr and hasLength() returns true), handle the stream
with skjpeg_mem_source_mgr, which directly assigns memory base to
the source manager. For other non memory backed streams, handle the
stream with skjpeg_buffered_source_mgr, which is renamed from
the old skjpeg_source_mgr with no implementation change.
Signed-off-by: cjbao <cathy.bao@intel.com>
Bug: skia:
Change-Id: I748de0bdba726bbb318922c08497135e73e37329
Reviewed-on: https://skia-review.googlesource.com/17296
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/codec/SkJpegDecoderMgr.h')
-rw-r--r-- | src/codec/SkJpegDecoderMgr.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/codec/SkJpegDecoderMgr.h b/src/codec/SkJpegDecoderMgr.h index 272c5b4b1c..20988eb724 100644 --- a/src/codec/SkJpegDecoderMgr.h +++ b/src/codec/SkJpegDecoderMgr.h @@ -65,11 +65,11 @@ public: private: - jpeg_decompress_struct fDInfo; - skjpeg_source_mgr fSrcMgr; - skjpeg_error_mgr fErrorMgr; - jpeg_progress_mgr fProgressMgr; - bool fInit; + jpeg_decompress_struct fDInfo; + std::unique_ptr<jpeg_source_mgr> fSrcMgr; + skjpeg_error_mgr fErrorMgr; + jpeg_progress_mgr fProgressMgr; + bool fInit; }; #endif |