summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cfx_dibsource.cpp
AgeCommit message (Collapse)Author
2018-08-10Add CFX_DIBSource::GetWritableScanline().Tom Sepez
Remove a bunch of const_cast<uint8_t*> or equivalent. This will also help when we convert to span<>, since casting spans is a nuisance. Change-Id: I330e5041cbaf33a84425fc4242a3dfacf5ca8011 Reviewed-on: https://pdfium-review.googlesource.com/39831 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-29Get rid of FXARGB_MAKE macro.Lei Zhang
ArgbEncode() does the same thing. Change-Id: Ibb05ed4aae720c0a5ba66771699c0d7e11230921 Reviewed-on: https://pdfium-review.googlesource.com/32230 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-03-21Add helpers to work with FXDIB_Format.Lei Zhang
Helper functions make getting the bpp and component count more readable. Change-Id: Ie0f97d52136d11ef5251f6e22748e87aea289ae1 Reviewed-on: https://pdfium-review.googlesource.com/28572 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@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>
2018-03-05Make FPDFBitmap_GetFormat() work for JBIG images.Lei Zhang
BUG=pdfium:945 Change-Id: I2a880e747b6f5a2fabed4d34ce47b69ff589ce3f Reviewed-on: https://pdfium-review.googlesource.com/27814 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-01Break up CFX_DIBSource::ConvertBuffer().Lei Zhang
Change-Id: If93b4782016c7f27c1533417d019f3271c807941 Reviewed-on: https://pdfium-review.googlesource.com/27813 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-01Fix some nits in CFX_DIBSource::CloneConvert().Lei Zhang
Change-Id: I25c16b7159d168bd6deb4fd9936bb242d7e8c590 Reviewed-on: https://pdfium-review.googlesource.com/27812 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-27Make ConvertBuffer_* voidchromium/3279Nicolas Pena
This CL makes the helper methods 'ConvertBuffer_'* in CFX_DIBSource void since they always succeed. Change-Id: I55dd714bec5ccc3695cd0bbebcf978d767acc53a Reviewed-on: https://pdfium-review.googlesource.com/19650 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-11-27Prepend ++ in CFX_DIBSourceNicolas Pena
In this CL, we do some nit cleanup and change many var++ to ++var in CFX_DIBSource. Change-Id: I2379e6e15688cbde68415adc47b01114ad0785c1 Reviewed-on: https://pdfium-review.googlesource.com/19570 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2017-09-21Rename CFX_RetainPtr to RetainPtrDan Sinclair
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 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-08-03APIs and tests for extracting bitmaps from image objectsJane Liu
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image object, and a FPDFBitmap_GetFormat() that returns the format of a bitmap. * Fixed a small bitmap conversion bug in cfx_dibsource.cpp. * Enabled EmbedderTest::CompareBitmap() to support different formats of bitmaps. * Added an embedder test and a test PDF file with images of many different formats. Bug=pdfium:677 Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed Reviewed-on: https://pdfium-review.googlesource.com/9690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-07-12Move CMYKtoRGB methods to fx_codec and clean them upNicolas Pena
This CL moves CMYKtoRGB methods to fx_codec. It also cleans them up a bit, including allowing them to return tuples instead of having non-const refs in their parameters. Change-Id: Ib3ec45102ec7eff623cd07a624e852d39bf335e4 Reviewed-on: https://pdfium-review.googlesource.com/7591 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-07-10Move core/fxge/ge to core/fxge.Dan Sinclair
This brings the cpp and h files together and removes the redundant ge/ path. Change-Id: I36594b8ae719d362768ba4c2e4ce173e287363eb Reviewed-on: https://pdfium-review.googlesource.com/7452 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-06-29Move Start to constructor in CFX_Image(Renderer|Transformer)chromium/3145Nicolas Pena
The bool returned by Start was not being used and the method was always called right after the constructor, so it should be in the constructor. Change-Id: I98abf9f7c11fbe42b3aa15ec5e46731198aa23d5 Reviewed-on: https://pdfium-review.googlesource.com/7151 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-05-23Use NOTREACHED() in more places.Lei Zhang
Change-Id: I88466943171f19259f84add69679741d44c8e123 Reviewed-on: https://pdfium-review.googlesource.com/5551 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-05-08Remove default params in CFX_DIBSourceNicolas Pena
Change-Id: I9306afed2747e3b0054adeea1d39916cac47f5c5 Reviewed-on: https://pdfium-review.googlesource.com/5091 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-04-11Refactor CFX_Palettechromium/3069Nicolas Pena
The pointer members point to owned arrays. Avoid FX_Free in CFX_Palette. Use std::pair and avoid the use of a buggy quicksort. Change-Id: I5d5471d56dbfd32800e204c84664c436d1fbab08 Reviewed-on: https://pdfium-review.googlesource.com/4038 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-04-04Finish splitting up fx_dib.hNicolas Pena
After this CL, fx_dib.h only has some definitions used in multiple places. Definitions that were of restricted usage were moved out to the corresponding place. Includes in fx_dib were reduced, thus revealing other needed includes. Change-Id: I3607da0af81c491256d64c0aa085225631efbdcc Reviewed-on: https://pdfium-review.googlesource.com/3594 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-04-03Drop FXSYS_ from mem methodsDan Sinclair
This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-04-03Drop FXSYS_ from math methodsDan Sinclair
This Cl drops the FXSYS_ from math methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I85c9ff841fd9095b1434f67319847ba0cd9df7ac Reviewed-on: https://pdfium-review.googlesource.com/3598 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-04-03Split fx_dib part 5Nicolas Pena
Move more classes into their own files. Change-Id: Ic505be9e406eafb378235216ea19221ce172f32e Reviewed-on: https://pdfium-review.googlesource.com/3593 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-31Split fx_dib part 3Nicolas Pena
Moved CFX_ImageRenderer, CFX_ImageTransformer to their own files. Change-Id: Ic98403f62bea317600a933f79946a2a9bad30eeb Reviewed-on: https://pdfium-review.googlesource.com/3551 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-31Split fx_dib part 1Nicolas Pena
Move CFX_DIBSource to its own file. Also move the classes that inherit from it to their own headers. Their cpp's will be added in followup. Change-Id: Id2b53e124ea5445c558bfcf627bf526870cc92e8 Reviewed-on: https://pdfium-review.googlesource.com/3450 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>