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 8681609ca07a7c59f2314f9d98bd150f2e309a51..e82fff0104f369a8c7ae284a6942578f2e40a200 100644 |
| --- a/core/src/fxcodec/jbig2/JBig2_Context.h |
| +++ b/core/src/fxcodec/jbig2/JBig2_Context.h |
| @@ -11,6 +11,7 @@ |
| #include <utility> |
| #include "../../../../third_party/base/nonstd_unique_ptr.h" |
| +#include "../../../include/fpdfapi/fpdf_objects.h" |
| #include "../../../include/fxcodec/fx_codec_def.h" |
| #include "JBig2_List.h" |
| #include "JBig2_Page.h" |
| @@ -19,7 +20,8 @@ |
| class CJBig2_GRDProc; |
| class IFX_Pause; |
| -using CJBig2_CachePair = std::pair<const uint8_t*, CJBig2_SymbolDict*>; |
| +using CJBig2_CacheKey = std::pair<FX_DWORD, FX_DWORD>; |
|
Lei Zhang
2015/10/06 22:40:24
Can you document what the key / value is?
David Lattimore
2015/10/07 22:41:53
Done.
|
| +using CJBig2_CachePair = std::pair<CJBig2_CacheKey, CJBig2_SymbolDict*>; |
|
Lei Zhang
2015/10/06 22:40:24
CJBig2_CachePair owns the CJBig2_SymbolDict* right
David Lattimore
2015/10/07 22:41:53
Done.
|
| #define JBIG2_SUCCESS 0 |
| #define JBIG2_FAILED -1 |
| @@ -35,10 +37,8 @@ using CJBig2_CachePair = std::pair<const uint8_t*, CJBig2_SymbolDict*>; |
| class CJBig2_Context { |
| public: |
| static CJBig2_Context* CreateContext( |
| - const uint8_t* pGlobalData, |
| - FX_DWORD dwGlobalLength, |
| - const uint8_t* pData, |
| - FX_DWORD dwLength, |
| + CPDF_StreamAcc* pGlobalStream, |
| + CPDF_StreamAcc* pSrcStream, |
| std::list<CJBig2_CachePair>* pSymbolDictCache, |
| IFX_Pause* pPause = NULL); |
| @@ -54,12 +54,11 @@ class CJBig2_Context { |
| FXCODEC_STATUS GetProcessingStatus() { return m_ProcessingStatus; } |
| private: |
| - CJBig2_Context(const uint8_t* pGlobalData, |
| - FX_DWORD dwGlobalLength, |
| - const uint8_t* pData, |
| - FX_DWORD dwLength, |
| + CJBig2_Context(CPDF_StreamAcc* pGlobalStream, |
| + CPDF_StreamAcc* pSrcStream, |
| std::list<CJBig2_CachePair>* pSymbolDictCache, |
| - IFX_Pause* pPause); |
| + IFX_Pause* pPause, |
| + bool isGlobal); |
|
Lei Zhang
2015/10/06 22:40:24
bIsGlobal if you want to be consistent with the re
David Lattimore
2015/10/07 22:41:53
Done.
|
| ~CJBig2_Context(); |
| @@ -125,6 +124,7 @@ class CJBig2_Context { |
| FX_DWORD m_dwOffset; |
| JBig2RegionInfo m_ri; |
| std::list<CJBig2_CachePair>* const m_pSymbolDictCache; |
| + bool m_IsGlobal; |
| }; |
| #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_CONTEXT_H_ |