Various changes to JBig2 cache:
authorDavid Lattimore <dml@google.com>
Thu, 8 Oct 2015 21:18:20 +0000 (08:18 +1100)
committerDavid Lattimore <dml@google.com>
Thu, 8 Oct 2015 21:18:20 +0000 (08:18 +1100)
commitf1b88e76134808f36f16b9e53a2e9dd89b12c8fd
tree215fae3dd4fe42787ea4cc2fa2a4d1e4cd587d76
parent8793b4a071fad51a770b93838e0752505b020e43
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/include/fxcodec/fx_codec.h
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fxcodec/codec/codec_int.h
core/src/fxcodec/codec/fx_codec_jbig.cpp
core/src/fxcodec/jbig2/JBig2_BitStream.cpp
core/src/fxcodec/jbig2/JBig2_BitStream.h
core/src/fxcodec/jbig2/JBig2_Context.cpp
core/src/fxcodec/jbig2/JBig2_Context.h
core/src/fxcodec/jbig2/JBig2_Segment.cpp
core/src/fxcodec/jbig2/JBig2_Segment.h