summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_PddProc.cpp
AgeCommit message (Collapse)Author
2018-06-29Limit image size in CJBig2_PDDProc.Lei Zhang
CJBig2_PDDProc internally creates a CJBig2_GRDProc to create an image. If the image is too big, then processing it can use up too much memory. BUG=chromium:857106 Change-Id: I06a9eaed6941be1cbb7481d21048e6a1681696b7 Reviewed-on: https://pdfium-review.googlesource.com/36490 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-06-29Clean up CJBig2_PDDProc.Lei Zhang
Change-Id: Ia83ac5dae0dedf55f1b0f0cf2a728c64474f72db Reviewed-on: https://pdfium-review.googlesource.com/36450 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-22Fix method style in JBig2_Image.Lei Zhang
Rename fooBar() to FooBar(). Change-Id: I87775fa14ce7e4f4a5897780d0d02fb61c7693ff Reviewed-on: https://pdfium-review.googlesource.com/32739 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-01Add struct CJBig2_GRDProc::ProgressiveArithDecodeState.Lei Zhang
Track the decode state in one data structure. Also grab pointers to data structure members before tight loops when decoding. It turns out referring to this->foo in tight loops can actually slow down decoding. Change-Id: I6a09b08ca06ef05968966055b5ad20f8c89896af Reviewed-on: https://pdfium-review.googlesource.com/31790 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-27Fix style for many jbig2 methods.chromium/3412Lei Zhang
Change-Id: Ie700e132f13f2cb4851ea59b68c891e3c42af243 Reviewed-on: https://pdfium-review.googlesource.com/31531 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-03-06Rename core/fxcrt IFX files to IfaceDan Sinclair
This CL renames the 3 IFX files in core/fxcrt to Iface instead. Change-Id: I7cee6836650b71bc5c5729a8147fda62f0910fe3 Reviewed-on: https://pdfium-review.googlesource.com/27970 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-31Split IFX_Pause out of fx_basicDan Sinclair
This CL moves IFX_Pause out to its own class from fx_basic and updates includes as needed. Change-Id: Iebdd183d8c85aa17570f190f1a7d1602c0af3c8b Reviewed-on: https://pdfium-review.googlesource.com/12491 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-14More unique_ptrs in JBIG2 code part 2Nicolas Pena
This CL makes HDPATS in CJBig2_PatternDict be a vector of unique_ptr. Change-Id: Ib23aed6323d4a988b2eedc4bfe95f2098d32c188 Reviewed-on: https://pdfium-review.googlesource.com/7871 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-13More unique_ptrs in JBig2 codeNicolas Pena
This CL makes CJBig2_Segment own the results: symbol, pattern, huffman, and huffman. This causes a lot more unique_ptr usage in JBig2 code. Change-Id: I1f0a5bfaaf85053658b467bef5325c72d1f496c7 Reviewed-on: https://pdfium-review.googlesource.com/7690 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-05-26Pass CJBig2_ArithDecoder to CJBig2_GRDProc as needed.Tom Sepez
Avoid holding a stale pointer to it in CJBig2_GRDProc. Bug: 726732 Change-Id: Ia3797a3e087f61bd2126f867fd5a282e873de5bc Reviewed-on: https://pdfium-review.googlesource.com/6050 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-05-05More unused IFX_Pause parameters removedchromium/3091Dan Sinclair
Remove IFX_Pause parameters which are passed but not used. Change-Id: I51a491c7f9a429676d114a387390fac3ae65e187 Reviewed-on: https://pdfium-review.googlesource.com/4950 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-30Add some calls to MakeUniqueDan Sinclair
This CL replaces some new's with pdfium::MakeUnique. Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb Reviewed-on: https://pdfium-review.googlesource.com/3430 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-05-26Fix a bug which may cause infinite loopweili
When the condition is "status == FXCODEC_STATUS_DECODE_TOBECONTINUE" while |status| never gets updated in the loop, it would enter infinite loop. Also, since Start_decode_MMR() never returns FXCODEC_STATUS_DECODE_TOBECONTINUE, there is no point to check on the return value for that. Review-Url: https://codereview.chromium.org/2013263002
2016-03-25Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692tsepez
Review URL: https://codereview.chromium.org/1832173003
2016-03-14Move core/src/ up to core/.Dan Sinclair
This CL moves the core/src/ files up to core/ and fixes up the include guards, includes and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1800523005 .