Chromium Code Reviews| Index: core/src/fxcodec/jbig2/JBig2_Context.h |
| diff --git a/core/src/fxcodec/jbig2/JBig2_Context.h b/core/src/fxcodec/jbig2/JBig2_Context.h |
| index eb0ceb0eb96adfb48a9801c81a2f58e401df3398..1986e66fbd815ca834d67206dd74b8c9f24eda93 100644 |
| --- a/core/src/fxcodec/jbig2/JBig2_Context.h |
| +++ b/core/src/fxcodec/jbig2/JBig2_Context.h |
| @@ -10,18 +10,21 @@ |
| #include <list> |
| #include <utility> |
| -#include "JBig2_Module.h" |
| +#include "../../../../third_party/base/nonstd_unique_ptr.h" |
| +#include "../../../include/fxcodec/fx_codec_def.h" |
| +#include "JBig2_GeneralDecoder.h" |
| #include "JBig2_List.h" |
| -#include "JBig2_Segment.h" |
| +#include "JBig2_Module.h" |
| #include "JBig2_Page.h" |
| -#include "JBig2_GeneralDecoder.h" |
| -#include "../../../include/fxcodec/fx_codec_def.h" |
| +#include "JBig2_Segment.h" |
| + |
| +using CJBig2_CachePair = std::pair<uint8_t*, CJBig2_SymbolDict*>; |
| -typedef std::pair<uint8_t*, CJBig2_SymbolDict*> CJBig2_CachePair; |
| -typedef enum { |
| +enum JBig2State { |
|
Tom Sepez
2015/09/03 20:24:58
nit: private, scoped by CJBig2_Context class.
Lei Zhang
2015/09/03 22:52:12
Done.
|
| JBIG2_OUT_OF_PAGE = 0, |
| JBIG2_IN_PAGE, |
| -} JBig2State; |
| +}; |
| + |
| #define JBIG2_SUCCESS 0 |
| #define JBIG2_FAILED -1 |
| #define JBIG2_ERROR_TOO_SHORT -2 |
| @@ -36,6 +39,7 @@ typedef enum { |
| #define JBIG2_RANDOM_STREAM 2 |
| #define JBIG2_EMBED_STREAM 3 |
| #define JBIG2_MIN_SEGMENT_SIZE 11 |
| + |
| class CJBig2_Context : public CJBig2_Object { |
|
Tom Sepez
2015/09/03 20:24:58
missed one?
Lei Zhang
2015/09/03 22:52:12
No, next CL...
|
| public: |
| static CJBig2_Context* CreateContext( |
| @@ -126,15 +130,15 @@ class CJBig2_Context : public CJBig2_Object { |
| int32_t m_nState; |
| - CJBig2_List<CJBig2_Segment>* m_pSegmentList; |
| + CJBig2_List<CJBig2_Segment> m_SegmentList; |
| - CJBig2_List<JBig2PageInfo>* m_pPageInfoList; |
| + CJBig2_List<JBig2PageInfo> m_PageInfoList; |
| CJBig2_Image* m_pPage; |
| FX_BOOL m_bBufSpecified; |
| - int32_t m_nSegmentDecoded; |
| + size_t m_nSegmentDecoded; |
| IFX_Pause* m_pPause; |
| int32_t m_PauseStep; |
| FXCODEC_STATUS m_ProcessiveStatus; |
| @@ -142,7 +146,7 @@ class CJBig2_Context : public CJBig2_Object { |
| CJBig2_ArithDecoder* m_pArithDecoder; |
| CJBig2_GRDProc* m_pGRD; |
| JBig2ArithCtx* m_gbContext; |
| - CJBig2_Segment* m_pSegment; |
| + nonstd::unique_ptr<CJBig2_Segment> m_pSegment; |
| FX_DWORD m_dwOffset; |
| JBig2RegionInfo m_ri; |
| std::list<CJBig2_CachePair>* m_pSymbolDictCache; |