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

Unified Diff: core/src/fxcodec/jbig2/JBig2_SymbolDict.h

Issue 1395613003: Put CJBig2_SymbolDict's images in a CJBig2_List container. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: 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 c8e39dc84576232888818d37cf3dbeb5d6c91062..577bfbc2f21a79de07c64ae6f89f24d13307709b 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<CJBig2_SymbolDict> 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<CJBig2_Image> m_SDEXSYMS;
};
#endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_

Powered by Google App Engine
This is Rietveld 408576698