Age | Commit message (Collapse) | Author |
|
Remove redundant CPDF_Name constructors given promotion rules.
Rework one char* in CPDF_PageContentGenerator.
Review URL: https://codereview.chromium.org/1890973006
|
|
Fixes a potential mismatch of |m_nComponents| between CPDF_DIBSource and
its CPDF_ColorSpace, from code attempting to recover from a failed decoder
initialisation in CPDF_DIBSource::CreateDecoder.
BUG=chromium:603518
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1892143003
|
|
These are exposed by making the ByteString from ByteStringC
ctor explicit, but we can clean them up independently.
Review URL: https://codereview.chromium.org/1884363002
|
|
StringC's are all that's needed here. Also CMap_GetString()
and GetCode() are side-effect free, so remove calls where
the value is not used.
Review URL: https://codereview.chromium.org/1889003002
|
|
Do the same for CFX_WideTextBuf as well.
The name is confusing because these return CFX_ByteStringC,
not CFX_ByteString. The AsStringC naming gives parallelism with
the string types themselves, and may help to indicate that
the result is only good for the lifetime of the object being
operated upon.
Review URL: https://codereview.chromium.org/1886263003
|
|
This will help avoid duplicate allocation of CFX_ByteStrings
when the caller already has one. It may seem counter-intuitive
that requiring the caller to pass an allocated CFX_ByteString
rather than a static CFX_ByteStringC would improve the situation,
but due to the idiosyncrasies of std::map, the CPDF_Dictionary
methods must always do an allocation under the covers which
can't be avoided.
The changed callers in this CL are places where we would
previously demote to CFX_ByteStringC and then allocate a
a duplicate CFX_ByteString in the dictionary method.
Review URL: https://codereview.chromium.org/1889863002
|
|
BUG=
Review URL: https://codereview.chromium.org/1885973002
|
|
Add iterators to enable range based for loop. Also add unit tests for recent modified functions.
Review URL: https://codereview.chromium.org/1878803002
|
|
Clean up three 4701 warnings (use potientially uninitialized variable)
which are the only ones left;
Re-enable warning 4701 for GN build;
Remove an unused data structure;
BUG=pdfium:29
Review URL: https://codereview.chromium.org/1885093002
|
|
This CL removes IFX_ArabicChar, IFX_RTFBreak, IFX_TxtBreak, IFX_WordBreak,
IFX_FormatString, and IFX_GSUBTable. References were updated to be the concrete
classes.
The CFX_GSUBTable was also removed as it is unused.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1882213002
|
|
if |m_Family| was RGB, the code assumed there were 3 components, which
may not be the case.
BUG=chromium:602046
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1877033003
|
|
All of the ICodec_* interfaces had a single implementation. This CL removes
the interfaces and uses the concrete classes in their place.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1876023003
|
|
Using these webpages as guides
http://www.globelegislators.org/pdfjs/test/pdfs/alphatrans.pdf
http://www.antennahouse.com/antenna1/wp-content/uploads/2015/07/background-image-gradient-1.pdf
flesh out the gradient shaders to include the PostScript Type 0
sampling function and to include radial gradients. This CL makes
rendering these pages agree with Adobe Reader output.
Some of these examples use an Extend array to clip the gradient.
Skia does not currently support this natively, so construct the
clip manually for now.
Other PDF pages may construct gradients using alternate mechanisms
-- this code will continue to be refactored as those come to light.
In particular, this CL sets up the clip and matrix differently for
axial gradients and radial gradients -- while it makes sense to do
it one way only, I prefer to defer until I have more examples to
work with.
R=dsinclair@chromium.org,tsepez@chromium.org
Review URL: https://codereview.chromium.org/1870463002
|
|
GetConstString() has sharp edges in that when applied to
a CPDF_Number, it must return null whereas GetString() returns
a the stringified number, because of the inability to
control the lifetime of the underlying allocated string.
Deleting this method showed several places where we
actually wanted a *String, not a *StringC, so we were
re-allocating a string we already had.
Review URL: https://codereview.chromium.org/1879683002
|
|
BUG=chromium:401189
Review URL: https://codereview.chromium.org/1871373002
|
|
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which
has non-standard APIs such as GetSize() returns int.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1867183002 .
|
|
BUG=
Review URL: https://codereview.chromium.org/1868293002
|
|
The naming is redundant given the base type, and will stand
in the way of consolidating Byte and Wide code.
BUG=
Review URL: https://codereview.chromium.org/1862123003
|
|
The few places these are called are better served by explicit
calls to CFX_ByteString() itself. This helps make Byte and
Wide strings more similar.
Also prevents fx_string.h from having any knowledge of fx_basic.h's
ByteTextBuf class.
Review URL: https://codereview.chromium.org/1870043003
|
|
Review URL: https://codereview.chromium.org/1864153002
|
|
We removed the FX_DWORD typedef in favour of uint32_t. This CL cleans up the
FX_SAFE_DWORD naming to match.
BUG=pdfium:81, pdfium:470
Review URL: https://codereview.chromium.org/1861403002
|
|
This CL is a straight move of the fxge includes into core/fxge/include.
Review URL: https://codereview.chromium.org/1868533002
|
|
Review URL: https://codereview.chromium.org/1860223002
|
|
This CL updates CFX_ByteStringC to use the more common c_str
and raw_str instead of GetCStr and GetPtr.
Review URL: https://codereview.chromium.org/1857713003
|
|
Having this happen implicitly can be dangerous because the lifetime
has to be considered; we should have caught the "red bots" in
https://codereview.chromium.org/1847333004/#ps60001 at compile time.
Review URL: https://codereview.chromium.org/1853233002
|
|
This CL removes _FXBSTR and changes FPDF_AbbrPair to hold
two FX_CHAR pointers. The two remaining uses of FX_BSTRC()
were in unused FDE_CSS defines which have been removed.
BUG=pdfium:151
Review URL: https://codereview.chromium.org/1847333004
|
|
The code is changed or had been changed to no longer generate these
warnings. It is safe to re-enabled these warnings.
In this code change, we fixed some code which generates warnings 4018
(signed/unsigned mismatch) and 4146 (unary minus operator applied to
unsigned type, result still unsigned).
Warning 4333 (right shift by too large amount, data loss) and 4345
(an object of POD type constructed with an initializer of the form ()
will be default-initialized) are no longer generated.
The same setting is applied and verified for GN build as well.
BUG=pdfium:29
Review URL: https://codereview.chromium.org/1849443003
|
|
Review URL: https://codereview.chromium.org/1841313004
|
|
This makes pdfium code on Linux and Mac sign-compare warning free.
The warning flag will be re-enabled after checking on windows clang build.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1841643002 .
|
|
Every time I read this code, I have to make the mental substituion
that "Element value" means "de-ref indirect object", so it might
as well just say so.
BUG=
Review URL: https://codereview.chromium.org/1841173002
|
|
Remove unimplemented/unused class, and other cleanup
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1834063002 .
|
|
The warnings generated by Clang. This is part 1 for some simple cases.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1840483003 .
|
|
Review URL: https://codereview.chromium.org/1832173003
|
|
To draw paths that are stroked and filled with a pair of colors,
reduce the fill by the width of the stroke. This is implemented
with path ops subtracting the resolved stroke shape from the
fill shape. This permits rendering the result without requiring
an offscreen bitmap.
The implementation for stroke+fill requires a new entry into
the graphics engine, so a bit was added to device caps for that.
Extract the gradient information out of the axial gradient
function descriptions, and when possible, use Skia to draw
the linear gradient directly. This requires making the function
descriptions non-opaque, and adding a bit to device caps for
another entry into the graphics engine.
BUG=
Review URL: https://codereview.chromium.org/1828283002
|
|
First step to getting rid of FX_DWORD.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1832113003 .
|
|
The last 3 params of CPDF_Image::SetImage are unused, remove and cleanup logic.
BUG=pdfium:194
Review URL: https://codereview.chromium.org/1831263002
|
|
Patch by forshaw.
This patch adds bounds checking to the names buffer passed to GetNameFromTT.
There are observed crashes in this function where data is read outside of
the bounds allocated and passed to GetNameFromTT. There's no reason that
this function should ever try and read outside of the allocated bounds.
BUG=583037
TBR=forshaw@chromium.org
patch from issue 1829013002 at patchset 40001 (http://crrev.com/1829013002#ps40001)
Review URL: https://codereview.chromium.org/1830243003 .
|
|
Compilers have good inline memcmp nowadays, so we don't
have to resort to old tricks.
Remove FXDWORD_FROM_LSBFIRST and FXDWORD_FROM_MSBFIRST
while we're at it. MSBFIRST was technically wrong due
to promotion to int.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1834553002 .
|
|
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places
the classes into individual files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1824033002 .
|
|
This CL moves the fxcrt code into the core/fxcrt directory. The only exception
was fx_bidi.h which was moved into core/fxcrt as it is not used outside of
core/.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1825953002 .
|
|
After moving EmbeddedUnicodeFromCharcode the
IsValidEmbeddedCharcodeFromUnicodeCharset method is no longer used on windows.
TBR=weili@chromium.org
Review URL: https://codereview.chromium.org/1827823002 .
|
|
EmbeddedCharcodeFromUnicode is not used on windows anymore and clang complains.
TBR=weili@chromium.org
Review URL: https://codereview.chromium.org/1828673002 .
|
|
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1821423002 .
|
|
Add a few missing consts and remove a few extra externs.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1817283002 .
|
|
It isn't buying us anthing, and it looks strange in
a struct when other uint types are already present.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1821043003 .
|
|
Re-enable the following warnings:
4245: signed/unsigned conversion mismatch;
4310: cast may truncate data;
4389: operator on signed/unsigned mismatch;
4701: use potentially uninitialized local variable;
4706: assignment within conditional expression
Clean up the code to avoid those warnings.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1801383002 .
|
|
This CL splits the file into individual classes and moves them into
core/fpdfapi/fpdf_page as needed.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1811053002 .
|
|
Saves a few bytes here and there because the tables need
only 16 bits but wchar is 32 bits (except on windows).
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1815313003 .
|
|
This CL splits the fpdf_page.h header into the individual classes and moves
them to the correct core/fpdfapi locations.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1805663002 .
|
|
This Cl moves a bunch of the files from core/include/fpdfapi to their correct
location outside the core/include tree.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1805603002 .
|