diff options
author | weili <weili@chromium.org> | 2016-07-19 16:06:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-19 16:06:10 -0700 |
commit | 8ca60b2cda3efc112c987c1d57d1eb8568667da9 (patch) | |
tree | b9170a729249b4f4aa8751e2f713afed77fca15b /core/fxcodec/codec/ccodec_jbig2module.h | |
parent | 5b36f0a0eff7f3666a0e642640db3c89e4bb6748 (diff) | |
download | pdfium-8ca60b2cda3efc112c987c1d57d1eb8568667da9.tar.xz |
Use smart pointers for various Jbig2 decoding contexts
Use unique_ptr for class owned member variables, and remove unnecessary
or unused functions and member variable.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2149903002
Diffstat (limited to 'core/fxcodec/codec/ccodec_jbig2module.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_jbig2module.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index 63e63afcfa..5d77d53619 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -20,7 +20,7 @@ class IFX_Pause; class CCodec_Jbig2Context { public: CCodec_Jbig2Context(); - ~CCodec_Jbig2Context() {} + ~CCodec_Jbig2Context(); uint32_t m_width; uint32_t m_height; @@ -29,8 +29,7 @@ class CCodec_Jbig2Context { uint8_t* m_dest_buf; uint32_t m_dest_pitch; IFX_Pause* m_pPause; - CJBig2_Context* m_pContext; - CJBig2_Image* m_dest_image; + std::unique_ptr<CJBig2_Context> m_pContext; }; class CCodec_Jbig2Module { @@ -38,7 +37,6 @@ class CCodec_Jbig2Module { CCodec_Jbig2Module() {} ~CCodec_Jbig2Module(); - CCodec_Jbig2Context* CreateJbig2Context(); FXCODEC_STATUS StartDecode(CCodec_Jbig2Context* pJbig2Context, std::unique_ptr<CFX_Deletable>* pContextHolder, uint32_t width, @@ -50,7 +48,6 @@ class CCodec_Jbig2Module { IFX_Pause* pPause); FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context, IFX_Pause* pPause); - void DestroyJbig2Context(CCodec_Jbig2Context* pJbig2Context); }; #endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ |