diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-04 14:37:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-04 21:48:48 +0000 |
commit | afd0d1f488ea55da545b3310fd8f22e45522a695 (patch) | |
tree | 89136eba4669421b6f828edb9f3d69ee558110d0 /core/fxcodec/codec | |
parent | 4f8b044b95dc282959dfe41453e2a9c1ec7e9354 (diff) | |
download | pdfium-afd0d1f488ea55da545b3310fd8f22e45522a695.tar.xz |
RefCount CPDF_StreamAcc all the time.
Pass stream argument to constructor; it feels like a
stream accessor should always be made from a stream rather
than passing one in after the fact.
Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44
Reviewed-on: https://pdfium-review.googlesource.com/3620
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r-- | core/fxcodec/codec/ccodec_jbig2module.h | 8 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jbig.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index c74ed5fb02..e4e0af35da 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -25,8 +25,8 @@ class CCodec_Jbig2Context { uint32_t m_width; uint32_t m_height; - CPDF_StreamAcc* m_pGlobalStream; - CPDF_StreamAcc* m_pSrcStream; + CFX_RetainPtr<CPDF_StreamAcc> m_pGlobalStream; + CFX_RetainPtr<CPDF_StreamAcc> m_pSrcStream; uint8_t* m_dest_buf; uint32_t m_dest_pitch; IFX_Pause* m_pPause; @@ -43,8 +43,8 @@ class CCodec_Jbig2Module { std::unique_ptr<JBig2_DocumentContext>* pContextHolder, uint32_t width, uint32_t height, - CPDF_StreamAcc* src_stream, - CPDF_StreamAcc* global_stream, + const CFX_RetainPtr<CPDF_StreamAcc>& src_stream, + const CFX_RetainPtr<CPDF_StreamAcc>& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, IFX_Pause* pPause); diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index dc82305616..951fec4813 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -45,8 +45,8 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( std::unique_ptr<JBig2_DocumentContext>* pContextHolder, uint32_t width, uint32_t height, - CPDF_StreamAcc* src_stream, - CPDF_StreamAcc* global_stream, + const CFX_RetainPtr<CPDF_StreamAcc>& src_stream, + const CFX_RetainPtr<CPDF_StreamAcc>& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, IFX_Pause* pPause) { |