summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Context.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-05-24 14:37:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-24 14:37:40 +0000
commit5bf772bade615d8cb3388f677d85785fe0c01824 (patch)
tree2fcdee842d114cd8dd298dd25b334bc0ce4fdeea /core/fxcodec/jbig2/JBig2_Context.h
parent18f7fbca461254cc0df1af2ca586df42b7fd6c17 (diff)
downloadpdfium-5bf772bade615d8cb3388f677d85785fe0c01824.tar.xz
Do some variable cleanup in CJBig2_Context
This CL cleans up variables in CJBig2_Context. It moves some declarations further, to when the variables are actually used. It also caches huffman tables in a vector of unique_ptr. Change-Id: Id3af96f9526b1000f681e4e2b174bba07b45ee55 Reviewed-on: https://pdfium-review.googlesource.com/32715 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Context.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.h b/core/fxcodec/jbig2/JBig2_Context.h
index 71215d0e8f..3113cce063 100644
--- a/core/fxcodec/jbig2/JBig2_Context.h
+++ b/core/fxcodec/jbig2/JBig2_Context.h
@@ -79,11 +79,14 @@ class CJBig2_Context {
std::vector<JBig2HuffmanCode> DecodeSymbolIDHuffmanTable(uint32_t SBNUMSYMS);
+ CJBig2_HuffmanTable* GetHuffmanTable(size_t idx);
+
std::unique_ptr<CJBig2_Context> m_pGlobalContext;
std::unique_ptr<CJBig2_BitStream> m_pStream;
std::vector<std::unique_ptr<CJBig2_Segment>> m_SegmentList;
std::vector<std::unique_ptr<JBig2PageInfo>> m_PageInfoList;
std::unique_ptr<CJBig2_Image> m_pPage;
+ std::vector<std::unique_ptr<CJBig2_HuffmanTable>> m_HuffmanTables;
size_t m_nSegmentDecoded;
bool m_bInPage;
bool m_bBufSpecified;