Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: core/fxcodec/codec/ccodec_jbig2module.h

Issue 2149903002: Use smart pointers for various Jbig2 decoding contexts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_render/render_int.h ('k') | core/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19
20 class CCodec_Jbig2Context { 20 class CCodec_Jbig2Context {
21 public: 21 public:
22 CCodec_Jbig2Context(); 22 CCodec_Jbig2Context();
23 ~CCodec_Jbig2Context() {} 23 ~CCodec_Jbig2Context();
24 24
25 uint32_t m_width; 25 uint32_t m_width;
26 uint32_t m_height; 26 uint32_t m_height;
27 CPDF_StreamAcc* m_pGlobalStream; 27 CPDF_StreamAcc* m_pGlobalStream;
28 CPDF_StreamAcc* m_pSrcStream; 28 CPDF_StreamAcc* m_pSrcStream;
29 uint8_t* m_dest_buf; 29 uint8_t* m_dest_buf;
30 uint32_t m_dest_pitch; 30 uint32_t m_dest_pitch;
31 IFX_Pause* m_pPause; 31 IFX_Pause* m_pPause;
32 CJBig2_Context* m_pContext; 32 std::unique_ptr<CJBig2_Context> m_pContext;
33 CJBig2_Image* m_dest_image;
34 }; 33 };
35 34
36 class CCodec_Jbig2Module { 35 class CCodec_Jbig2Module {
37 public: 36 public:
38 CCodec_Jbig2Module() {} 37 CCodec_Jbig2Module() {}
39 ~CCodec_Jbig2Module(); 38 ~CCodec_Jbig2Module();
40 39
41 CCodec_Jbig2Context* CreateJbig2Context();
42 FXCODEC_STATUS StartDecode(CCodec_Jbig2Context* pJbig2Context, 40 FXCODEC_STATUS StartDecode(CCodec_Jbig2Context* pJbig2Context,
43 std::unique_ptr<CFX_Deletable>* pContextHolder, 41 std::unique_ptr<CFX_Deletable>* pContextHolder,
44 uint32_t width, 42 uint32_t width,
45 uint32_t height, 43 uint32_t height,
46 CPDF_StreamAcc* src_stream, 44 CPDF_StreamAcc* src_stream,
47 CPDF_StreamAcc* global_stream, 45 CPDF_StreamAcc* global_stream,
48 uint8_t* dest_buf, 46 uint8_t* dest_buf,
49 uint32_t dest_pitch, 47 uint32_t dest_pitch,
50 IFX_Pause* pPause); 48 IFX_Pause* pPause);
51 FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context, 49 FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context,
52 IFX_Pause* pPause); 50 IFX_Pause* pPause);
53 void DestroyJbig2Context(CCodec_Jbig2Context* pJbig2Context);
54 }; 51 };
55 52
56 #endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_ 53 #endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/render_int.h ('k') | core/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698