Age | Commit message (Collapse) | Author |
|
Review-Url: https://codereview.chromium.org/2044453003
|
|
CFX_PSRenderer, IFX_PSOutput, CPSOutput, CPSPrinterDriver.
Also reland commit 2d63eaa.
Review-Url: https://codereview.chromium.org/2019603002
|
|
Three more bugs are discovered:
-- potientially used freed pointer;
-- potientially used uninitialized variable;
-- Used '&&' instead of bitwise operator '&'
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2040503002
|
|
The code may not cause error conditions, but can be improved. These
warnings include uninitialized variables, signed/unsigned mismatch,
redundant condition, and using bool in arithmetic operations.
Also remove a chunk of unused code.
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2036203004
|
|
When there are duplicate variable declarations, the inner names shadow the
outter ones. This is error prone and harder to read. Remove all the
instances found by /analyze.
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2027273002
|
|
This code has several disadvantages over a more modern graphics engine:
- no SIMD support
- no GPU support
- limited quality
Further, calling this code locks in the perceived resolution, so that
the output cannot be scaled without additional loss.
By directing all bitmap drawing through
CFX_SkiaDeviceDriver::StartDIBits, Skia can handle all appropriate
bitmap optimizations.
To that end, SetDIBits and StretchDIBits now call StartDIBits.
Other changes:
Skia's bitmaps are premultiplied. PDF contains bitmaps that are
unpremultiplied. PDFium appears to use premultiplied bitmaps sometimes,
and unpremultiplied bitmaps elsewhere. Add a debug check for
unpremultiplied bits in Skia's driver, and add a utility to premultiply
PDFium's bitmaps' bits.
PDFium supports a 24 bit RGB bitmap padded to a 32 bit word. Set the
high byte so that Skia can treat this as an ARGB bitmap.
Defer the application of the alpha value to the draw call rather than
calling MultiplyAlpha where possible.
Allow the destination bitmap to be alpha 8 or argb 32.
Review-Url: https://codereview.chromium.org/2025043002
|
|
So everyone can avoid doing Byte to WideString conversions.
Also remove CFX_GEFont::GetPsName() and deduplicate a couple of
GetPsName() calls.
Review-Url: https://codereview.chromium.org/2019173002
|
|
Some shading types do not use these fields.
Review-Url: https://codereview.chromium.org/2027053002
|
|
BUG=616248
Review-Url: https://codereview.chromium.org/2020183004
|
|
BUG=616246
Review-Url: https://codereview.chromium.org/2022263003
|
|
Remove unused dithering code.
Review-Url: https://codereview.chromium.org/2010813003
|
|
Fix some nits in CPDF_Parser::LoadCrossRefV5() and other callers.
Review-Url: https://codereview.chromium.org/2019443002
|
|
- Remove dead code
- Remove default arguments
- Move code into anonymous namespace
Review-Url: https://codereview.chromium.org/2013023002
|
|
Review-Url: https://codereview.chromium.org/2011943004
|
|
Review-Url: https://codereview.chromium.org/2009803003
|
|
Replace it with two generic slots for Links and Codec usage.
Since the codec is at a lower layer than the document, we
don't provide separate get/set methods, since having a
document upon which to call these would be a layering
violation. Do the same for the Links for simplicity.
Review-Url: https://codereview.chromium.org/2005193003
|
|
CFX_PrivateData served two purposes here:
The first was to hold an opaque pointer to the corresponding
page structure in the next higher layer, of which it knows
no details. Introduce an empty CPDF_Page::View class to
represent this higher class, so as to get type safety while
preserving layering.
The second was to hold an opaque render context, which it
also happened to own. Make this a CFX_Deletable to help
with management.
Also remove an unused inheritance from CFX_PrivateData
in CPDF_Annot.
Review-Url: https://codereview.chromium.org/2008553008
|
|
Resolve changes to cpdf_shadingpattern.h that prevent
Skia from building.
R=thestig@chromium.org,dsinclair@chromium.org,reed@google.com
BUG=
Review-Url: https://codereview.chromium.org/2017463002
|
|
Its only used to store one object, so replace it with a unique_ptr
to a class with a virtual dtor. Rename the prototypical class with
virtual dtor from CFX_DestructObject to CFX_Deletable. Rename the
fx_basic_module.cpp to cfx_modulemgr.cpp to match the one class
in it.
Review-Url: https://codereview.chromium.org/2013483003
|
|
Review-Url: https://codereview.chromium.org/1999313002
|
|
BUG=pdfium:496
Review-Url: https://codereview.chromium.org/2005653002
|
|
Review-Url: https://codereview.chromium.org/2000973002
|
|
Review-Url: https://codereview.chromium.org/2003833003
|
|
Review-Url: https://codereview.chromium.org/2001933002
|
|
BUG=pdfium:497
Review-Url: https://codereview.chromium.org/2003873002
|
|
BUG=pdfium:234
Review-Url: https://codereview.chromium.org/2001783003
|
|
Review-Url: https://codereview.chromium.org/1999553002
|
|
Review-Url: https://codereview.chromium.org/1990153003
|
|
Review-Url: https://codereview.chromium.org/1996533004
|
|
Also fix a divide by zero in CPDF_SampledFunc.
Do some cleanups too.
BUG=596530,613032
Review-Url: https://codereview.chromium.org/1990843004
|
|
... by using STL containers in more places.
Remove dead / duplicate code as well.
BUG=603904
Review-Url: https://codereview.chromium.org/1998583002
|
|
Review-Url: https://codereview.chromium.org/1990583002
|
|
The variable needs to be initialized before using.
Review-Url: https://codereview.chromium.org/1984323002
|
|
id:20001 of https://codereview.chromium.org/1988603002/ )
Reason for revert:
The variable is still needed, will fix the other way.
Original issue's description:
> Remove an unnecessary variable from CPDF_Creator
>
> The variable may not be initialized before using, which caused
> errors on DrMemory bot. Since it is not necessary, remove it.
>
> TBR=thestig@chromium.org
>
> Committed: https://pdfium.googlesource.com/pdfium/+/47b998b53edbb071bb55c909169be1070126fb22
TBR=dsinclair@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1987783002
|
|
The variable may not be initialized before using, which caused
errors on DrMemory bot. Since it is not necessary, remove it.
TBR=thestig@chromium.org
Review-Url: https://codereview.chromium.org/1988603002
|
|
These are the left or newly added code which causes compilation
warnings of "signed and unsigned comparison". Need to fix them
before I re-enable the warning flag.
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/1986533002
|
|
- Used unique_ptr and initializer list.
- Remove variables that never change in value.
Review-Url: https://codereview.chromium.org/1976003003
|
|
Add missing helper function to CFX_ByteTextBuf to avoid the
anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name
"Make" to indicate there's an allocation going on in this case.
Change some method arguments to take pre-existing ByteStrings where
possible.
Review-Url: https://codereview.chromium.org/1977093002
|
|
Most of the time, we want to operate on chars as if they
were unsigned, but there are a few places where we need
the default (questionably signed) values. Consolidate
the casting in a single place rather than forcing callers
to get a char* ptr.
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1972053003
|
|
Review-Url: https://codereview.chromium.org/1973913002
|
|
TBR=tsepez@chromium.org
Review-Url: https://codereview.chromium.org/1976443002
|
|
files. (patchset #1 id:1 of https://codereview.chromium.org/1946693002/ )"
This reverts commit a031357eaab7c934ac03717968cf78ff556c819b.
The reason to revert it is that some malformed or maliciously crafted PDF
files may cause crashes.
BUG=610973
Review-Url: https://codereview.chromium.org/1971013002
|
|
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1968233002
|
|
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1967223002
|
|
In particular, we seek to make more use of the .Mid()
(substr) method to make these.
Precursor to removing c_str() calls.
BUG=pdfium:493
Review-Url: https://codereview.chromium.org/1966293002
|
|
- Remove dead code in CPDF_Color.
- Encapsulate member variables.
- Added accessors as need.
- Remove unused CPDF_ColorSpace::GetMaxIndex().
- Remove redundent CPDF_StreamContentParser::GetNumber16().
Review-Url: https://codereview.chromium.org/1965243002
|
|
Cache the linearized result rather than recalculating it.
BUG=608778
Review-Url: https://codereview.chromium.org/1968743002
|
|
Investigate results of:
git grep -ni 'return [(]*[a-z0-9_]* &[^&]'
git grep -ni 'BOOL.*= [(]*[a-z0-9_]* &[^&]'
Review-Url: https://codereview.chromium.org/1951653002
|
|
(patchset #1 id:1 of https://codereview.chromium.org/1946693002/ )
Reason for revert:
The culprit was found and confirmed, not this one.
Original issue's description:
> Revert of Relax a couple checks to allow certain non-standard PDF files. (patchset #1 id:1 of https://codereview.chromium.org/1926823002/ )
>
> Reason for revert:
> Speculatively revert due to high volume of crashes on Chromium.
>
> Original issue's description:
> > Relax a couple checks to allow certain non-standard PDF files.
> >
> > Some non-standard PDF files misuse the size of cross reference table,
> > and reuse some object number which the old one is still in use. PDFium
> > can relax the reusing of xref objects only since it is not referred in
> > the pdf document. When the size of cross reference table is larger
> > than defined, PDFium will try to continue other than abort.
> >
> > BUG=chromium:596947
> >
> > Committed: https://pdfium.googlesource.com/pdfium/+/cd1e9ff4f432cbc29ed279e6891fb7ddc2ea3734
>
> TBR=thestig@chromium.org,dsinclair@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:596947
>
> Committed: https://pdfium.googlesource.com/pdfium/+/5fc4f31285c3a88fc157fd2d9b9cf2eb5c7cabed
TBR=thestig@chromium.org,dsinclair@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:596947
Review-Url: https://codereview.chromium.org/1947983002
|
|
(patchset #1 id:1 of https://codereview.chromium.org/1926823002/ )
Reason for revert:
Speculatively revert due to high volume of crashes on Chromium.
Original issue's description:
> Relax a couple checks to allow certain non-standard PDF files.
>
> Some non-standard PDF files misuse the size of cross reference table,
> and reuse some object number which the old one is still in use. PDFium
> can relax the reusing of xref objects only since it is not referred in
> the pdf document. When the size of cross reference table is larger
> than defined, PDFium will try to continue other than abort.
>
> BUG=chromium:596947
>
> Committed: https://pdfium.googlesource.com/pdfium/+/cd1e9ff4f432cbc29ed279e6891fb7ddc2ea3734
TBR=thestig@chromium.org,dsinclair@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:596947
Review-Url: https://codereview.chromium.org/1946693002
|