Age | Commit message (Collapse) | Author |
|
Many of these are already unique_ptrs.
Change-Id: I3695d4ff5a8f7483ad994ac7657897fd55069cd5
Reviewed-on: https://pdfium-review.googlesource.com/4690
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I656e8028001fadd7869a08593f10b0b8e25fe01c
Reviewed-on: https://pdfium-review.googlesource.com/4497
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Fix illegal leading underscore in class name while at it.
Change-Id: Idd138eb42f4a0676552aa02d7dda4c29d1877348
Reviewed-on: https://pdfium-review.googlesource.com/4438
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Avoid a string duplication along the way.
Change-Id: I866c34ad1afb20b9578aeb7cabeb8a185674c884
Reviewed-on: https://pdfium-review.googlesource.com/4437
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ie34942e6e577dfa270417b17c59a51813f310d27
Reviewed-on: https://pdfium-review.googlesource.com/4436
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ic4e766d9417f9a9ece5f9e4269d0f96e1e91639b
Reviewed-on: https://pdfium-review.googlesource.com/4392
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl cleans up the unused defines in fx_codepage.h. The
FXFONT_CHARSET_ defines are replaced with fx_codepage defines, this
moves fx_codepage into core instead of xfa only. Static asserts are
added to verify the public/ charsets match the fx_codepage charsets.
Change-Id: Ie2f749e093de60a9a6743128a1fb087912e4cc96
Reviewed-on: https://pdfium-review.googlesource.com/4316
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I85c8423c177fd7ecd5da90ef89419efc0f9cf44b
Reviewed-on: https://pdfium-review.googlesource.com/4262
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change pass by reference to const reference or pointer.
Change-Id: Ic007f14e6569679a846980a96cc627eac4ecd5d6
Reviewed-on: https://pdfium-review.googlesource.com/3953
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
- All callers of CFX_DIBitmap methods use nullptr as the ICC Transform.
- The CFX_ScanlineCompositor is always initialized with a null ICC transform.
Many of its methods call TranslateScanline from the ICC module. This method
casts just uses ((CLcmsCmm*)pTransform)->m_hTransform, and this should not be
done when pTransform is nullptr.
Change-Id: I1b846d1f20699fa017cb9a276be3214eb8fabd4b
Reviewed-on: https://pdfium-review.googlesource.com/3931
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
If windows is unable to resolve the font stream,
use the custom empty handler instead, which
maps to freetype.
R=dsinclair@chromium.org,bungeman@google.com
Bug:chrome:705580
Change-Id: Ib1732f29f462fc5d5e42329088c80c83abe3ea25
Reviewed-on: https://pdfium-review.googlesource.com/3771
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
This CL avoids some void* usage and removes CancelDIBits after making a
CPDF_ImageRenderer own its CFX_ImageRenderer.
Bug: pdfium:686
Change-Id: Ied205c57a858cc14d8e2c592db3444ed465b2796
Reviewed-on: https://pdfium-review.googlesource.com/3673
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
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>
|
|
This Cl drops the FXSYS_ from utility methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I0859b60c5ba7af68c929a519dd76f48c27a6c896
Reviewed-on: https://pdfium-review.googlesource.com/3614
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
This Cl drops the FXSYS_ from file methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I095c64fed69bf70e00a2594fa94a1fdc71a7060e
Reviewed-on: https://pdfium-review.googlesource.com/3610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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>
|
|
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>
|
|
Assigning to m_Mask will invalidate the pMask argument if m_Mask itself
is passed into the method.
BUG=706346
Change-Id: Ieaac480eb9e857c3199fd539c23978fb7f372461
Reviewed-on: https://pdfium-review.googlesource.com/3376
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit 31b08d4cdaa17d7a03f35e087096a77036af98ec.
Re-landing the patch after fixing skia build issue.
Change-Id: Ie7039890088b803a6ec5ce365d70f57277459b48
Reviewed-on: https://pdfium-review.googlesource.com/3245
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit 0004f29bf6ee3c6060a272c79f14993e92e053c7.
Reason for revert: Breaks build with skia_paths enabled (which will break the chrome roll).
../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:1858:38: error: no member named 'get' in 'CFX_RetainPtr<CFX_DIBitmap>'
../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:1861:42: error: no member named 'get' in 'CFX_RetainPtr<CFX_DIBitmap>'
../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2987:15: error: no viable overloaded '='
../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2991:18: error: no viable overloaded '='
../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:2999:17: error: no viable overloaded '='
../../third_party/pdfium/core/fxge/skia/fx_skia_device.cpp:3001:43: error: no member named 'GetObject' in 'CFX_RetainPtr<CFX_DIBitmap>'
Original change's description:
> Refcount all CFX_DIBSources (and subclasses) all the time.
>
> There are currently several ownership models for these objects,
> including ad-hoc logic for sharing and deletion, and the
> now-redundant CFX_DIBitmapRef externally-counted handle to the DIBs.
>
> Replace them all with the internal refcount scheme.
>
> Change-Id: I2db399dfc19219eda384f94cc989353b78ce2872
> Reviewed-on: https://pdfium-review.googlesource.com/3166
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
>
TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org,pdfium-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I678b1fbc5e666cf7a19372ebaff3270fb115ba5e
Reviewed-on: https://pdfium-review.googlesource.com/3243
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
There are currently several ownership models for these objects,
including ad-hoc logic for sharing and deletion, and the
now-redundant CFX_DIBitmapRef externally-counted handle to the DIBs.
Replace them all with the internal refcount scheme.
Change-Id: I2db399dfc19219eda384f94cc989353b78ce2872
Reviewed-on: https://pdfium-review.googlesource.com/3166
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Using the font name instead of the family name on Linux to increase the amount
of fonts that get mapped to the default one. This is not done on the other OS
because this is a hard-coding that should be avoided, and our bug PDF works
fine on those OS.
BUG=309664
Change-Id: I2d51f66d65dc042dd638c72c55a403ea78a90dfe
Reviewed-on: https://pdfium-review.googlesource.com/2892
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl converts the PointX,PointY pairs into a CFX_PointF.
Change-Id: I46897832077c317a5bffb4e568550705decbc40c
Reviewed-on: https://pdfium-review.googlesource.com/2821
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl converts several uses of TransformPoint to use Transform(CFX_PointF).
Change-Id: I9bc3c484e0a4304b904584218bd9e59dec7db727
Reviewed-on: https://pdfium-review.googlesource.com/2791
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This converts the two Origin{X,Y} points in fx_font to CFX_Point{F} points.
Change-Id: Id7cbb34a6e76043f1b26e9d7091d89f300dfc563
Reviewed-on: https://pdfium-review.googlesource.com/2720
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the Origin x,y coordinates in FXTEXT_CHARPOS to be an
CFX_PointF.
Change-Id: I67281db2cb82687e12490145f7c99aee908e5fa8
Reviewed-on: https://pdfium-review.googlesource.com/2718
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL simplifies some of the logic in GetZeroAreaPath. It also removes the
side effect of resetting the object device matrix.
Change-Id: Id1e355bde811341c5ceab0331fbe64b1aed895d5
Reviewed-on: https://pdfium-review.googlesource.com/2712
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL replaces the array of path points with a vector. Cleaning up the usage
as required.
Change-Id: Ifa386a2c847005fef68af748ebe99c4e08961238
Reviewed-on: https://pdfium-review.googlesource.com/2710
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit da83d3a5cc09c4056310b3cf299dbbccd5c70d11.
Reason for revert: Reverting chain to see if fixes Chrome roll.
Original change's description:
> Convert Origins to points
>
> This CL converts various OriginX, OriginY pairs into CFX_PointF objects.
>
> Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844
> Reviewed-on: https://pdfium-review.googlesource.com/2575
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: Nicolás Peña <npm@chromium.org>
>
TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Change-Id: I949fb4ec712e2587e7d0ef0191c34db198b61dcc
Reviewed-on: https://pdfium-review.googlesource.com/2696
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts various OriginX, OriginY pairs into CFX_PointF objects.
Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844
Reviewed-on: https://pdfium-review.googlesource.com/2575
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL removes unused CFX_Matrix methods and cleans up the implementaion
of others.
Change-Id: I72d1d10d4a45cc9341a980054df5225e52a0c4f2
Reviewed-on: https://pdfium-review.googlesource.com/2574
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the two Transform() overrides from CFX_Matrix and calls the
TransformPoint methods directly. In the case of the 4 param version the
values were assigned to the out values before calling.
Change-Id: Id633826caec75b848774dcda6cfdcef2dbf5a7db
Reviewed-on: https://pdfium-review.googlesource.com/2573
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl removes the rect based transform method which internally just called
the matrix tranform method. The callers have been reversed to make it clearer
the matrix is transforming the rect.
Change-Id: I8ef57ccc2311e4e853b8180a6ff475f8eda2138e
Reviewed-on: https://pdfium-review.googlesource.com/2572
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl changes several Get methods to return their values instead of using
out parameters.
Change-Id: Ie9a930a5c2d0e809f2d7181ca033d801945c1cf9
Reviewed-on: https://pdfium-review.googlesource.com/2556
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
The PathObject uses GraphState to obtain the bounding box, so I set defaults,
according to Table 4.2 of PDF spec 1.7. Not testing stroke for now because the
default line width seems to be too small and is not being rendered.
Methodology: add the test methods to the RenderPage method in pdfium_test, and
run with --png and --md5. Check that the png is reasonable with respect to the
expected result, and use the output md5 on the embeddertest.
BUG=pdfium:661
Change-Id: I674fe3a68374c8d58cd99aaf9dad66e29e057281
Reviewed-on: https://pdfium-review.googlesource.com/2554
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This Cl fixes the naming of the size types to match their purpose. This makes
the code clearer.
Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790
Reviewed-on: https://pdfium-review.googlesource.com/2551
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl updates the code to use the constructors instead of creating an
empty object and calling Set(). It also removes the various memsets of
the CFX_Rect{F} classes.
Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4
Reviewed-on: https://pdfium-review.googlesource.com/2550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This hopefully makes it less confusing what the description of a point is.
Currently we have defines for the types, which is confusing because a point
can only be one of the three. And it is mixed up with whether the point is
closing a figure or not.
Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753
Reviewed-on: https://pdfium-review.googlesource.com/2552
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Fix callers conventions to avoid ambiguity.
Fix bad bounds check unmasked by change.
Directly include headers no longer pulled in by numerics itself.
Review-Url: https://codereview.chromium.org/2640143003
|
|
BUG=669893
Change-Id: I0977c031d5b272ce5182da6b3020ac092e30aef4
Reviewed-on: https://pdfium-review.googlesource.com/2210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
In turn, this makes CFX_BinaryBuf::AttachData() unused.
Review-Url: https://codereview.chromium.org/2578793002
|
|
We can remove a lot of "bOwnsStream" logic in the process.
Always pass these by const reference, in case the called method
wants to hang on to the stream (one exception is where we stick
a raw pointer into a void* slot in a context from another layer).
Review-Url: https://codereview.chromium.org/2451493002
|
|
This permits consecutive path drawing or text drawing to combine
if their graphics state matches. This speeds up rendering considerably
when PDFium draws in many small parts. It also allows discarding
changes to the clip state that have no effect from draw to draw.
All corpus tests draw equivalently with caching enabled or disabled.
Change the member order in CPDF_PageRenderContext so the device is
flushed before the referencing annotation is deleted.
Add more printf style debugging for test draws.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2546803003
|
|
Moved all CFX_LinuxFontInfo to the namespace. Added its constructor and
destructor. And fixed includes and {}s.
Review-Url: https://codereview.chromium.org/2529013002
|
|
Transparencies and bitmap patterns need to be
unpremultiplied after Skia renders them so
that PDFium can use its own compositing.
Also added some linear (i.e. axial) gradient
support, although its unclear if any of the
test corpus uses this feature.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2520073003
|
|
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This adds text to the _SUPPORT_SKIA_PATHS_
variant.
The output of the test corpus has more
differences, but no feature changes or
dropouts that I can see.
The text is a bit lighter. Bungeman thinks
this is because of our support of SRGB
color, although the fonts also look different
so maybe there's more to the story.
The output looks compatible with the
variations I see in Adobe Reader and Firefox
on the same platform.
There's probably more text tuning to do.
Additionally, this turns off the caching
feature for this variation. Caching can't
work because the drawing alternates between
Skia and PDFium's native blits, so any
state caching won't know about changes
and drawing performed by the other.
R=dsinclair@chromium.org, bungeman@chromium.org
Review-Url: https://codereview.chromium.org/2520483002
|