Age | Commit message (Collapse) | Author |
|
Using bit values in an int may not be reliable, since different parts of
the code can interpret the bits differently. e.g. FXDIB_DOWNSAMPLE and
RENDER_FORCE_DOWNSAMPLE are defined in different places, but can be used
interchangeably because they just happen to have the same value. It
works but is rather fragile.
Instead, use a struct of bools to explicitly define what different bits
mean. Remove FXDIB_DOWNSAMPLE and friends.
Change-Id: I9cf0c8f94d1ed27edf8dba22b0ab0ee67f2722cc
Reviewed-on: https://pdfium-review.googlesource.com/c/44650
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Consolidate matrix transforms from several places.
Change-Id: I2febcaed69afd1cf3eabf68f27ffe24301f07ca2
Reviewed-on: https://pdfium-review.googlesource.com/c/44631
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Then do IWYU to fix up build errors. Move some implementations out of
headers to allow more forward declarations.
Change-Id: Idbeb978705a21cd6fb710ca9f5e99b4ea7d93ec5
Reviewed-on: https://pdfium-review.googlesource.com/c/44632
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
In RenderDeviceDriverIface and related classes, and for related methods
in the call stack.
Change-Id: I420fafe70084eb3941dffc6f9f51ecbed79581de
Reviewed-on: https://pdfium-review.googlesource.com/c/44552
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:1085
Change-Id: Ieb43d4588e1d689e327e428dcbbf7adba45ce178
Reviewed-on: https://pdfium-review.googlesource.com/c/44545
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
- A valid matrix is always passed in, so make the parameter const-ref.
Since it is not obvious who owns the passed in matrix, make a copy
with the corresponding matrix member.
- Since the matrix parameter is const-ref, CFX_DIBBase::TransformTo()
can also have a const-ref matrix parameter.
- |flags| should be uint32_t, since |m_Flags| is.
- |pClips| is only used inside the ctor, so remove |m_pClip|.
Change-Id: If3d58a3fd28fa72b4ac7caac15f49a8057c594db
Reviewed-on: https://pdfium-review.googlesource.com/c/44541
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The blend mode is never set to this value.
Change-Id: I96cbadb055137a9de45f0082c81a7b8aedb9a427
Reviewed-on: https://pdfium-review.googlesource.com/c/44544
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I5c42af8e9e2d6a60648d291153326aef04e4c49e
Reviewed-on: https://pdfium-review.googlesource.com/c/44513
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I69436316dd4a12ebdc3f09e7db3bf25c7495a4ce
Reviewed-on: https://pdfium-review.googlesource.com/c/44512
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove some setters on newly constructed objects, since |m_bStroke| is
already initialized to false.
Change-Id: I8d04efec997226fb86091566eea96604f18680aa
Reviewed-on: https://pdfium-review.googlesource.com/c/44511
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Also move member initialization to the header.
Change-Id: I557380ae774ddf887cefeb56df2a33e5b7cff8a4
Reviewed-on: https://pdfium-review.googlesource.com/c/44510
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
It is always passed as FXDIB_Alpha. Rename method to indicate its
new purpose, and remove dead code.
Change-Id: Ifaf4faa6b25d1cbd2ff272309764b49de70dc836
Reviewed-on: https://pdfium-review.googlesource.com/c/44491
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I1104d5c3c63dbf9f2f286797db842d30c75e2718
Reviewed-on: https://pdfium-review.googlesource.com/c/44077
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Move foo_embeddertest.cpp to the same BUILD.gn file as foo.cpp.
Set up dependencies to make pdfium_embeddertests pass gn check.
Change-Id: If1fe67c261960c35c344c1047950cd7fdb32c4a1
Reviewed-on: https://pdfium-review.googlesource.com/c/43997
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use allow_circular_includes_from as a crutch for now.
Change-Id: Ia7a29a268e67b1fe21bed5cdd629e06fb5cc7bfb
Reviewed-on: https://pdfium-review.googlesource.com/c/43992
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I98e2e913f11ff63e70cb841de00a4f56b06ca03b
Reviewed-on: https://pdfium-review.googlesource.com/c/43974
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
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>
|
|
Make them compatible with pdfium::CollectionSize().
Change-Id: Ibef3b182e35a7eca7c656cf590462782de0cc157
Reviewed-on: https://pdfium-review.googlesource.com/c/43937
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I2897feee27f80c85f0328f0b220ae5be93686170
Reviewed-on: https://pdfium-review.googlesource.com/c/43610
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d
Reviewed-on: https://pdfium-review.googlesource.com/c/43609
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
At the same time, change it from 4 floats to a CFX_FloatRect.
Change-Id: I00ded941723d6a264b7a17c73fd337e66b449308
Reviewed-on: https://pdfium-review.googlesource.com/c/43570
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Instead, add GetTransformedBBox() with a required matrix parameter and
use that when the there is a matrix.
Change-Id: I594f3eb6bc7e1bc3eb6aa9f66556ebb1dfdbebe1
Reviewed-on: https://pdfium-review.googlesource.com/c/43553
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Eliminate the possibility of nullptr.
Change-Id: I16c3e442d78e5151330db7227bd1c1630af3d4a3
Reviewed-on: https://pdfium-review.googlesource.com/c/43531
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Remove the member and simplify logic in all the places this
is passed.
Change-Id: I39b979793fe84f0dc460261223655dd7f50555cc
Reviewed-on: https://pdfium-review.googlesource.com/c/43474
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Use std::unique_ptr and MaybeOwned, instead of manual memory management.
Change-Id: I5f08abd869245fb55b7e868621369ff3ea34146f
Reviewed-on: https://pdfium-review.googlesource.com/43211
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Callers only ever pass in nullptr for the bitmap parameter.
Change-Id: Iefeb72a1268521a38b3d5ab4b03163b67bf35796
Reviewed-on: https://pdfium-review.googlesource.com/43210
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: If13cc70d3d047f255f5d289f35a8533811523146
Reviewed-on: https://pdfium-review.googlesource.com/43110
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit 214982c4d02a720c3b1b3de121cddc62189b8848.
Reason for revert: Turns out it is reachable.
Original change's description:
> Remove unreachable code in CPDF_DIBBase.
>
> The colorspace is always available when creating image decoders that use
> colorspaces.
>
> Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed
> Reviewed-on: https://pdfium-review.googlesource.com/42872
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
TBR=thestig@chromium.org,rharrison@chromium.org
BUG=chromium:888743
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I45903543f0e4bf2785660fb8c1e45c34febb6ecf
Reviewed-on: https://pdfium-review.googlesource.com/43050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ifcce7b1e513c8859752d5248ae686bbe5349e342
Reviewed-on: https://pdfium-review.googlesource.com/42614
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The colorspace is always available when creating image decoders that use
colorspaces.
Change-Id: I20ac75edcd614ccc1e83de262c128776e9d03eed
Reviewed-on: https://pdfium-review.googlesource.com/42872
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ia5f72e6397ee959d897a945c4069f47c494b5511
Reviewed-on: https://pdfium-review.googlesource.com/42870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
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>
|
|
Also add a GetRenderOptions() helper method.
Change-Id: I47db7a21f55f396e08775575f6b2a48e440c2f91
Reviewed-on: https://pdfium-review.googlesource.com/42750
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Iee7ce04630fed86f651cd382a19e46b2f7ab6d61
Reviewed-on: https://pdfium-review.googlesource.com/42672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I6761a5f7fc099807c09abacdccbb72d282252551
Reviewed-on: https://pdfium-review.googlesource.com/42604
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Make it a private method, and add public methods so only limited
combinations of LoadAllData() arguments are possible.
Change-Id: I8c2220eb0e95012350858876586f7c470c40a7c3
Reviewed-on: https://pdfium-review.googlesource.com/42590
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3b6a386cf376a418ad64514313c791437ea54cf6
Reviewed-on: https://pdfium-review.googlesource.com/41610
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The bug also requires end circle to be tiny (radius of < 0.01).
Bug: pdfium:1140
Change-Id: I2b355f44f0383334b8988fe41f82cb3f587e9909
Reviewed-on: https://pdfium-review.googlesource.com/41672
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Radial shading is done between two circles with their own centers and
radii. When one has a radius of 0 and is located on or very close to
the border of the other circle, a should be 0, but is not due to
rounding errors unless the circles are aligned in x or y.
Bug: pdfium:1140
Change-Id: Ief2efa91f3f16f7bed439aa471b258fa4d680acf
Reviewed-on: https://pdfium-review.googlesource.com/41590
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
These look too much like public/ FPDF functions otherwise and yet
they are not exposed anywhere beyond core/fpdfapi. Disambiguate
one method vs. top-level function usage as a result.
Bug: pdfium:1141
Change-Id: I9cfdfced90386bb9ef6b2b86f568f2e6f8ee6a5a
Reviewed-on: https://pdfium-review.googlesource.com/41530
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ie344bb37abf7dde158d03cc2897dca3588f1a5e3
Reviewed-on: https://pdfium-review.googlesource.com/41550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Also rename .cpp file to match class name and .h file.
Modify some helper functions to operate on spans.
Move some initializations to member declarations.
Change-Id: Ie0889bda91daaef80fae6f5681f8ce068e92453b
Reviewed-on: https://pdfium-review.googlesource.com/41534
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3dc2dd54d89858722c2aea4b9e694308796b8274
Reviewed-on: https://pdfium-review.googlesource.com/41510
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It is not a source from which you can get CFX_DIBs, but rather a
base class from which all DIBs inherit.
Do the same thing for the CPDF_DIBSource wrapper class.
Mechanical change apart from adding a one-line comment in cfx_dibbase.h
Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184
Reviewed-on: https://pdfium-review.googlesource.com/41352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
- Remove set, but otherwise unused variables.
- Mark some pdfium_test code as V8-enabled only.
- Do not build one unit test with GCC.
Change-Id: I3f04273a7731086e08386478a62769bf06f6d8a4
Reviewed-on: https://pdfium-review.googlesource.com/41271
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This immediately flags a case where a pointer from a heap object to
a caller's stack object is persisted past the caller's lifetime. Fix
it the simplest way via AutoRestorer<> so we'll get a nice safe segv
should it be used.
Change-Id: I554304b235e73c279fa0cd79c9e3ee0138be45f9
Reviewed-on: https://pdfium-review.googlesource.com/40592
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Two variants make the intention much clearer.
Change-Id: Ied0d8e6fa8c5524c19cafe8036d7c1b470fda86d
Reviewed-on: https://pdfium-review.googlesource.com/40352
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I6a2bd03e00ad4e3d57f6931c0c6cf4ae0c760afb
Reviewed-on: https://pdfium-review.googlesource.com/40290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Move mandatory arguments to ctor.
Replace long list of positional parameters with setter methods.
Make Initialize() return void since it can't fail.
Change-Id: I490118923855158891cf45eecd5de1e922a3a1fe
Reviewed-on: https://pdfium-review.googlesource.com/40170
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|