summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/jbig2/JBig2_Context.cpp
AgeCommit message (Collapse)Author
2015-12-24Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
R=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 .
2015-12-22Start using allowed C++11 features.Lei Zhang
R=dml@google.com, thakis@chromium.org Review URL: https://codereview.chromium.org/1544923002 .
2015-12-18Cleanup CJBig2_HuffmanTable and friends.chromium/2599chromium/2598chromium/2597Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1536923002 .
2015-12-18Fix the JBIG2 decoding regressions from commit bc4b82e and 8a9ce57.Lei Zhang
BUG=566063 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1534323002 .
2015-10-19Sanity check the values of TRUE and FALSE.Lei Zhang
Get rid of cond ? TRUE : FALSE. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1405723003 .
2015-10-09Sanitize CJBig2_SymbolDict's memory usage.chromium/2534chromium/2533chromium/2532Lei Zhang
- Use std::vector<JBig2ArithCtx> instead of storing pointers to arrays. - Make CJBig2_SymbolDict's members private with accessors. - Use std::vector<JBig2ArithCtx> in related places. - Steal Chromium's vector_as_array() and use it as an adaptor as needed. BUG=514891 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1388203003 .
2015-10-09Various changes to JBig2 cache:David Lattimore
- 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 .
2015-10-08Put CJBig2_SymbolDict's images in a CJBig2_List container.Lei Zhang
Also mark it private. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1395613003 .
2015-10-07Fix the Windows build after commit 8a9ce57.Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1396533002 .
2015-10-07Remove gotos in JBig2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1382613003 .
2015-10-05Disable JBIG2 cache; prevent data corruption - try 2.Lei Zhang
Also change CJBig2_SymbolDict::DeepCopy() to return a unique_ptr to prevent a potential leak if the cache size was 0. BUG=pdfium:207 R=tsepez@chromium.org, jbreiden@google.com Review URL: https://codereview.chromium.org/1374633004 .
2015-10-02Prevent divide by zeros in CJBig2_GSIDProc::decode_MMR().Lei Zhang
Check the image size before attempting to decode. BUG=538103 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1377493005 .
2015-10-01Disable JBIG2 cache; prevent data corruptionLei Zhang
BUG=pdfium:207 Original author: jbreiden@google.com Original CL: http://codereview.chromium.org/1362133003/ R=jbreiden@google.com Review URL: https://codereview.chromium.org/1382073002 .
2015-09-24Fix a leak in CJBig2_Context.chromium/2520Lei Zhang
- Remove dead code - Use unique_ptr BUG=pdfium:202 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1365903002 .
2015-09-24Split up JBig2_GeneralDecoder.cpp.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1359233002 .
2015-09-15Cleanup: Fix a typo. s/Processive/Processing/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1338573002 .
2015-09-11Convert some unneeded gotos into returns.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1332193002 .
2015-09-10Guard against null image data in CJBig2_GRRDProc.chromium/2509chromium/2508Lei Zhang
Credit to karl at skomski.com for the initial version of the CL. BUG=527174 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1305033006 .
2015-09-10Remove CJBig2_Object, CJBig2_Module, and friends.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1326953006 .
2015-09-03Remove CJBig2_Module::JBig2_Error and friends.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1327983003 .
2015-09-03Make a bunch of JBig2 classes independent of CJBig2_Object.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1319713003 .
2015-09-02Remove dead JBig2 code.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1328643002 .
2015-08-04clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
2015-07-27Revert "FX Bool considered harmful, part 3"Tom Sepez
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255293002 .
2015-07-27FX Bool considered harmful, part 3Tom Sepez
Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 .
2015-07-23Revert "FX_BOOL considered harmful, part 2."Tom Sepez
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9. Reason for revert: build failure. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1255693002 .
2015-07-23FX_BOOL considered harmful, part 2.Tom Sepez
Fully automatic change, execpt for cleanup in fx_system.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1254703002 .
2015-07-23Fix FX_BOOL type mismatches.Tom Sepez
Extracted from https://codereview.chromium.org/1252613002/ R=thestig@chromium.org Review URL: https://codereview.chromium.org/1253603002 .
2015-07-22Merge to master: _FETAL => _FATAL.Tom Sepez
(cherry picked from commit 8a0a834d2aea61fc92590839b86471ac73daa967) Original Review URL: https://codereview.chromium.org/1247213002 . Note: inadvertantly landed on XFA first. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1252013002 .
2015-06-19Cleanup: Do not check pointers before deleting them.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004.
2015-06-10Cleanup: Remove uses of "this->" in core/Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173223002.
2015-06-09Use stdint.h types throughout PDFium.Tom Sepez
It's redundant nowadays to provide our own equivalents, now that this is done for us by the system header. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1177483002
2015-01-05Remove static declared SymbolDictCache.Bo Xu
This is a follow up CL on https://codereview.chromium.org/761313004/ BUG=https://code.google.com/p/pdfium/issues/detail?id=93 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/828183002
2014-12-17Add a small LRU cache for the JBIG2 symbol dictionary.Bo Xu
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
2014-06-09free, rather than delete, malloc'd object.chromium/2076chromium/2075chromium/2074chromium/2073chromium/2072chromium/2071chromium/2070chromium/2069chromium/2068chromium/2067chromium/2066chromium/2065chromium/2064chromium/2063chromium/2061chromium/2060chromium/2059chromium/2058chromium/2057chromium/2056chromium/2055chromium/2054chromium/2053chromium/2052chromium/2051chromium/2050chromium/2049chromium/2048chromium/2047chromium/2046chromium/2045chromium/2044John Abd-El-Malek
BUG=381031 Original patch by Chris Palmer <palmer@chromium.org> Review URL: https://codereview.chromium.org/322453002
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-17Initial commit.John Abd-El-Malek