| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ | 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ |
| 8 #define CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ | 8 #define CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "core/fxcodec/include/fx_codec_def.h" | 12 #include "core/fxcodec/include/fx_codec_def.h" |
| 13 #include "core/fxcrt/include/fx_basic.h" | 13 #include "core/fxcrt/include/fx_basic.h" |
| 14 | 14 |
| 15 class CJBig2_Context; | 15 class CJBig2_Context; |
| 16 class CJBig2_Image; | 16 class CJBig2_Image; |
| 17 class CPDF_StreamAcc; | 17 class CPDF_StreamAcc; |
| 18 class IFX_Pause; | 18 class IFX_Pause; |
| 19 class JBig2_DocumentContext; |
| 19 | 20 |
| 20 class CCodec_Jbig2Context { | 21 class CCodec_Jbig2Context { |
| 21 public: | 22 public: |
| 22 CCodec_Jbig2Context(); | 23 CCodec_Jbig2Context(); |
| 23 ~CCodec_Jbig2Context(); | 24 ~CCodec_Jbig2Context(); |
| 24 | 25 |
| 25 uint32_t m_width; | 26 uint32_t m_width; |
| 26 uint32_t m_height; | 27 uint32_t m_height; |
| 27 CPDF_StreamAcc* m_pGlobalStream; | 28 CPDF_StreamAcc* m_pGlobalStream; |
| 28 CPDF_StreamAcc* m_pSrcStream; | 29 CPDF_StreamAcc* m_pSrcStream; |
| 29 uint8_t* m_dest_buf; | 30 uint8_t* m_dest_buf; |
| 30 uint32_t m_dest_pitch; | 31 uint32_t m_dest_pitch; |
| 31 IFX_Pause* m_pPause; | 32 IFX_Pause* m_pPause; |
| 32 std::unique_ptr<CJBig2_Context> m_pContext; | 33 std::unique_ptr<CJBig2_Context> m_pContext; |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 class CCodec_Jbig2Module { | 36 class CCodec_Jbig2Module { |
| 36 public: | 37 public: |
| 37 CCodec_Jbig2Module() {} | 38 CCodec_Jbig2Module() {} |
| 38 ~CCodec_Jbig2Module(); | 39 ~CCodec_Jbig2Module(); |
| 39 | 40 |
| 40 FXCODEC_STATUS StartDecode(CCodec_Jbig2Context* pJbig2Context, | 41 FXCODEC_STATUS StartDecode( |
| 41 std::unique_ptr<CFX_Deletable>* pContextHolder, | 42 CCodec_Jbig2Context* pJbig2Context, |
| 42 uint32_t width, | 43 std::unique_ptr<JBig2_DocumentContext>* pContextHolder, |
| 43 uint32_t height, | 44 uint32_t width, |
| 44 CPDF_StreamAcc* src_stream, | 45 uint32_t height, |
| 45 CPDF_StreamAcc* global_stream, | 46 CPDF_StreamAcc* src_stream, |
| 46 uint8_t* dest_buf, | 47 CPDF_StreamAcc* global_stream, |
| 47 uint32_t dest_pitch, | 48 uint8_t* dest_buf, |
| 48 IFX_Pause* pPause); | 49 uint32_t dest_pitch, |
| 50 IFX_Pause* pPause); |
| 49 FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context, | 51 FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context, |
| 50 IFX_Pause* pPause); | 52 IFX_Pause* pPause); |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 #endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ | 55 #endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ |
| OLD | NEW |