From 8793b4a071fad51a770b93838e0752505b020e43 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 8 Oct 2015 12:13:10 -0700 Subject: Put CJBig2_SymbolDict's images in a CJBig2_List container. Also mark it private. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1395613003 . --- core/src/fxcodec/jbig2/JBig2_SymbolDict.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'core/src/fxcodec/jbig2/JBig2_SymbolDict.h') diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h index c8e39dc845..577bfbc2f2 100644 --- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h +++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h @@ -9,9 +9,10 @@ #include "../../../../third_party/base/nonstd_unique_ptr.h" #include "../../../include/fxcrt/fx_basic.h" -#include "JBig2_ArithDecoder.h" +#include "JBig2_List.h" class CJBig2_Image; +struct JBig2ArithCtx; class CJBig2_SymbolDict { public: @@ -20,12 +21,19 @@ class CJBig2_SymbolDict { nonstd::unique_ptr DeepCopy() const; + // Takes ownership of |image|. + void AddImage(CJBig2_Image* image) { m_SDEXSYMS.push_back(image); } + + size_t NumImages() const { return m_SDEXSYMS.size(); } + CJBig2_Image* GetImage(size_t index) const { return m_SDEXSYMS.get(index); } + public: - FX_DWORD SDNUMEXSYMS; - CJBig2_Image** SDEXSYMS; FX_BOOL m_bContextRetained; JBig2ArithCtx* m_gbContext; JBig2ArithCtx* m_grContext; + + private: + CJBig2_List m_SDEXSYMS; }; #endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_ -- cgit v1.2.3