summaryrefslogtreecommitdiff
path: root/core/fxcodec/bmp/cfx_bmpdecompressor.h
AgeCommit message (Collapse)Author
2018-10-12Remove more unnecessary includes and do IWYU as needed.Lei Zhang
Also move some implementations out of headers. Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee Reviewed-on: https://pdfium-review.googlesource.com/c/43890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-12Forward declare more in codec code.Lei Zhang
Change-Id: I8060ada299f845a9198a6e83d31d128bd4bf09bc Reviewed-on: https://pdfium-review.googlesource.com/c/43870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Pass CFX_CodecMemory in place of spans to codecs.Tom Sepez
Next step towards making CFX_CodecMemory own the memory it is ref-counting. Change-Id: I5922d80d13032c3ea028447c47d34a10234109a3 Reviewed-on: https://pdfium-review.googlesource.com/c/43630 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-20Fix misc lint errors and other cleanups.Lei Zhang
Change-Id: I00ce0109251d1231858e87ffc3889abe6937fa26 Reviewed-on: https://pdfium-review.googlesource.com/42811 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-09-20Remove many unneeded STL #includes from headers.Lei Zhang
Change-Id: I7010cedee8d17d05b2c37a94d767e6f3a9c48f7d Reviewed-on: https://pdfium-review.googlesource.com/42790 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-31Remove avail_buf out argument from GetAvailInput() methods.chromium/3542chromium/3541chromium/3540chromium/3539Tom Sepez
It's always passed as nullptr. It's a good thing, too, since it looks like some of the implementations are returning a wrong pointer. Add some missing |const|s. Change-Id: I768048fdfe4cdd1dc838fee26fec18e024e39920 Reviewed-on: https://pdfium-review.googlesource.com/41810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-24Use span<uint8_t> in more fxcodec code.Tom Sepez
There are also small tweaks in tests to ensure strict order of stack variable lifetimes. Change-Id: Ic9d5c6a2bdd378b517be627f8e29f725bafdc2ad Reviewed-on: https://pdfium-review.googlesource.com/41310 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-13Implement CFX_CodecMemory.Lei Zhang
This class is much simpler than CFX_MemoryStream and does only what CFX_BmpDecompressor and CFX_GifContext needs. Swap out CFX_MemoryStream and remove CFX_MemoryStream::Seek(). BUG=pdfium:263 Change-Id: Ifd8ce4d2b6c9fedd6ec842d46f54fc8e654fbca7 Reviewed-on: https://pdfium-review.googlesource.com/39880 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-07-25Use incomplete type CFX_BmpContext in place of void*chromium/3503Tom Sepez
Allows killing off static_cast<> in two places. Change-Id: I467b69d92e8cbda5c2916b6ed2e97c173d8b4f2f Reviewed-on: https://pdfium-review.googlesource.com/38897 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-02-13Change return value of GetAvailInputRyan Harrison
This changes the return value from uint32_t to FX_FILESIZE, which is the type the methods is uses return. The existing code does an unguarded static cast, so something like -1 could cause a very large value being returned. This change has a cascading impact up to the top of the progressive codec, which now has to handle negative values gracefully. Change-Id: I813fb71e932dd5da014dbaed0dbf3bb28f8d4e9f Reviewed-on: https://pdfium-review.googlesource.com/26450 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-12Convert CFX_BmpDecompressor to use CFX_MemoryStreamRyan Harrison
This also adds a Seek method to CFX_MemoryStream BUG=pdfium:1007 Change-Id: I2c7e1d3b6d8aff36e302014cb2e8ffc0f23ef7c4 Reviewed-on: https://pdfium-review.googlesource.com/26230 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-06Extract classes in fx_bmp.h into their own filesRyan Harrison
BUG=chromium:808336 Change-Id: I3201805a374b5403149eca701714ef4369a2e337 Reviewed-on: https://pdfium-review.googlesource.com/25630 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>