From f1b88e76134808f36f16b9e53a2e9dd89b12c8fd Mon Sep 17 00:00:00 2001 From: David Lattimore Date: Fri, 9 Oct 2015 08:18:20 +1100 Subject: Various changes to JBig2 cache: - Makes the cache be per-document - Keys the cache on ObjNum and stream offset instead of keying on a pointer to the data (which can result in false cache hits). - Makes it so the cache is only used for the globals stream. - Reenable the cache. R=thestig@chromium.org BUG=pdfium:207 Review URL: https://codereview.chromium.org/1380243004 . --- core/src/fxcodec/jbig2/JBig2_Segment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/src/fxcodec/jbig2/JBig2_Segment.cpp') diff --git a/core/src/fxcodec/jbig2/JBig2_Segment.cpp b/core/src/fxcodec/jbig2/JBig2_Segment.cpp index 7ad55f3515..1b0d4e9303 100644 --- a/core/src/fxcodec/jbig2/JBig2_Segment.cpp +++ b/core/src/fxcodec/jbig2/JBig2_Segment.cpp @@ -16,7 +16,8 @@ CJBig2_Segment::CJBig2_Segment() { m_dwPage_association = 0; m_dwData_length = 0; m_dwHeader_Length = 0; - m_pData = NULL; + m_dwObjNum = 0; + m_dwDataOffset = 0; m_State = JBIG2_SEGMENT_HEADER_UNPARSED; m_nResultType = JBIG2_VOID_POINTER; m_Result.vd = NULL; -- cgit v1.2.3