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

Side by Side Diff: core/src/fxcodec/jbig2/JBig2_Context.h

Issue 1326953006: Remove CJBig2_Object, CJBig2_Module, and friends. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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 _JBIG2_CONTEXT_H_ 7 #ifndef _JBIG2_CONTEXT_H_
8 #define _JBIG2_CONTEXT_H_ 8 #define _JBIG2_CONTEXT_H_
9 9
10 #include <list> 10 #include <list>
11 #include <utility> 11 #include <utility>
12 12
13 #include "../../../../third_party/base/nonstd_unique_ptr.h" 13 #include "../../../../third_party/base/nonstd_unique_ptr.h"
14 #include "../../../include/fxcodec/fx_codec_def.h" 14 #include "../../../include/fxcodec/fx_codec_def.h"
15 #include "JBig2_GeneralDecoder.h" 15 #include "JBig2_GeneralDecoder.h"
16 #include "JBig2_List.h" 16 #include "JBig2_List.h"
17 #include "JBig2_Module.h"
18 #include "JBig2_Page.h" 17 #include "JBig2_Page.h"
19 #include "JBig2_Segment.h" 18 #include "JBig2_Segment.h"
20 19
21 using CJBig2_CachePair = std::pair<uint8_t*, CJBig2_SymbolDict*>; 20 using CJBig2_CachePair = std::pair<uint8_t*, CJBig2_SymbolDict*>;
22 21
23 #define JBIG2_SUCCESS 0 22 #define JBIG2_SUCCESS 0
24 #define JBIG2_FAILED -1 23 #define JBIG2_FAILED -1
25 #define JBIG2_ERROR_TOO_SHORT -2 24 #define JBIG2_ERROR_TOO_SHORT -2
26 #define JBIG2_ERROR_FATAL -3 25 #define JBIG2_ERROR_FATAL -3
27 #define JBIG2_END_OF_PAGE 2 26 #define JBIG2_END_OF_PAGE 2
28 #define JBIG2_END_OF_FILE 3 27 #define JBIG2_END_OF_FILE 3
29 #define JBIG2_ERROR_FILE_FORMAT -4 28 #define JBIG2_ERROR_FILE_FORMAT -4
30 #define JBIG2_ERROR_STREAM_TYPE -5 29 #define JBIG2_ERROR_STREAM_TYPE -5
31 #define JBIG2_ERROR_LIMIT -6 30 #define JBIG2_ERROR_LIMIT -6
32 #define JBIG2_FILE_STREAM 0 31 #define JBIG2_FILE_STREAM 0
33 #define JBIG2_SQUENTIAL_STREAM 1 32 #define JBIG2_SQUENTIAL_STREAM 1
34 #define JBIG2_RANDOM_STREAM 2 33 #define JBIG2_RANDOM_STREAM 2
35 #define JBIG2_EMBED_STREAM 3 34 #define JBIG2_EMBED_STREAM 3
36 #define JBIG2_MIN_SEGMENT_SIZE 11 35 #define JBIG2_MIN_SEGMENT_SIZE 11
37 36
38 class CJBig2_Context : public CJBig2_Object { 37 class CJBig2_Context {
39 public: 38 public:
40 static CJBig2_Context* CreateContext( 39 static CJBig2_Context* CreateContext(
41 CJBig2_Module* pModule,
42 uint8_t* pGlobalData, 40 uint8_t* pGlobalData,
43 FX_DWORD dwGlobalLength, 41 FX_DWORD dwGlobalLength,
44 uint8_t* pData, 42 uint8_t* pData,
45 FX_DWORD dwLength, 43 FX_DWORD dwLength,
46 int32_t nStreamType, 44 int32_t nStreamType,
47 std::list<CJBig2_CachePair>* pSymbolDictCache, 45 std::list<CJBig2_CachePair>* pSymbolDictCache,
48 IFX_Pause* pPause = NULL); 46 IFX_Pause* pPause = NULL);
49 47
50 static void DestroyContext(CJBig2_Context* pContext); 48 static void DestroyContext(CJBig2_Context* pContext);
51 49
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 FX_BOOL m_bFirstPage; 135 FX_BOOL m_bFirstPage;
138 CJBig2_ArithDecoder* m_pArithDecoder; 136 CJBig2_ArithDecoder* m_pArithDecoder;
139 CJBig2_GRDProc* m_pGRD; 137 CJBig2_GRDProc* m_pGRD;
140 JBig2ArithCtx* m_gbContext; 138 JBig2ArithCtx* m_gbContext;
141 nonstd::unique_ptr<CJBig2_Segment> m_pSegment; 139 nonstd::unique_ptr<CJBig2_Segment> m_pSegment;
142 FX_DWORD m_dwOffset; 140 FX_DWORD m_dwOffset;
143 JBig2RegionInfo m_ri; 141 JBig2RegionInfo m_ri;
144 std::list<CJBig2_CachePair>* m_pSymbolDictCache; 142 std::list<CJBig2_CachePair>* m_pSymbolDictCache;
145 }; 143 };
146 #endif 144 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698