XFA: merge patch from CL 761313004
authorBo Xu <bo_xu@foxitsoftware.com>
Thu, 18 Dec 2014 01:51:00 +0000 (17:51 -0800)
committerBo Xu <bo_xu@foxitsoftware.com>
Fri, 19 Dec 2014 22:46:09 +0000 (14:46 -0800)
commit56ee1b311559b239511c5549121fe34cb6368459
tree028762d71967c83ad3a17f139728aee928f815cf
parent786febb9c8e85b9215a6a5126c6386a9f4b4d280
XFA: merge patch from CL 761313004

Add a small LRU cache for the JBIG2 symbol dictionary.

This reduces rendering time on my test document by over
10 seconds. It is super common for a JBIG2 dictionary to
span multiple pages, so we don't want to decode the same
dictionary over and over again.

Original patch from Jeff Breidenbach (breidenbach@gmail.com)

BUG=https://code.google.com/p/pdfium/issues/detail?id=85
R=bo_xu@foxitsoftware.com, thestig@chromium.org

Review URL: https://codereview.chromium.org/761313004
core/src/fxcodec/jbig2/JBig2_Context.cpp
core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
core/src/fxcodec/jbig2/JBig2_SymbolDict.h