Age | Commit message (Collapse) | Author |
|
Allows CFX_CountRefs to behave more like pointers.
Rename SetNull() to Clear() for consistency with other ptrs.
Change GetPrivateCopy() into MakePrivateCopy() with no return,
since the -> operators are clearer than getting an object pointer.
Review-Url: https://codereview.chromium.org/2283113002
|
|
Hide the CountedObj class from the rest of the code.
Rename GetModify() to GetPrivateCopy(), since it turns out
there are places where we modify a potentially-shared copy.
Add non-const version of GetObject() to permit these.
Review-Url: https://codereview.chromium.org/2287633002
|
|
Review-Url: https://codereview.chromium.org/2285513002
|
|
Added a vector of pointers to CFX_Fonts in the class CPDF_Font, so that
fallback fonts may be used. In CPDF_CharPosList::Load, the glyphs for each
character are calculated. When m_Font does not support a character, a fallback
font is selected and the character is rendered using that font. This meant
adding an attribute to FXTEXT_CHARPOS so it knows which font renders it.
Also, methods in fpdf_render_text.cpp now may need to call device drawing
methods multiple times because these only support one font at a time. In
CPDF_TextRenderer::DrawNormalText and in CPDF_TextRenderer::DrawTextPath, the
device drawing method is called as few times as possible by grouping contiguous
characters rendered by the same font. In
CPDF_RenderStatus::DrawTextPathWithPattern, drawing was already done one
character at a time, but precalculating CFX_FaceCache. Now, the face cache is
precalculated for all of the fallback fonts.
The list of fallback fonts does not include tha main font. Otherwise the list
would be of raw pointers to avoid double free problems. For now, the font
Arial is used as fallback. This should fix the issue of not seeing Latin
characters displayed when bad fonts are used. However, this should be improved.
Tested manually using the file in the bug, plus a font directory containing a
font that supports Hangul but not Latin. This font is chosen as the substitute
font, but Latin characters are now being rendered.
Design proposal: go/pdfium_fallbackfonts
BUG=pdfium:358
Review-Url: https://codereview.chromium.org/2276653002
|
|
Review-Url: https://codereview.chromium.org/2269203002
|
|
Moved ScopedFontTransform from fx_ge_text namespace to fx_font
Moved some arrays used by both CFX_Font and CFX_FaceCache from fx_ge_text to
inside CFX_Font class
Review-Url: https://codereview.chromium.org/2263623002
|
|
Moved classes CFX_FontCache and CFX_AutoFontCache into a separate file.
Review-Url: https://codereview.chromium.org/2246223002
|
|
PDFs draw bitmaps with alpha by supplying an
image alpha mask along side the image color data.
The alpha mask may not be the same scale as the
image data. Skia doesn't have a direct mapping
for this draw call, but can come close by using
the internal SkCompositeShader class.
This scales the alpha mask to match the size of
the image data, then puts both in the composite
shader to draw.
There are more things to do:
- Allow Alpha8 or Gray8 to draw scaled to
a matching device (blit doesn't work today)
Temporary code marked with
a TODO implements this functionality.
- Refactor PDFium to allow SkComposeShader's
components to take a matrix.
The latter goal will defer drawing so that PDFium
doesn't resize the mask, discarding resolution,
before Skia has a chance to record it.
Additionally fix drawing text with a negative
font size.
R=reed@google.com,dsinclair@chromium.org,herb@chromium.org
Review-Url: https://codereview.chromium.org/2182763002
|
|
files.
This is the third CL to separate fx_ge into classes, one per file.
All fx_ge.h includes had to be replaced with new includes
The method definitions for CFX_FxgeDevice were not moved to a single file.
These methods are defined in two folders different from fxge/ge, so they were left untouched for now.
Review-Url: https://codereview.chromium.org/2223213002
|
|
Review-Url: https://codereview.chromium.org/2226003003
|
|
This is the second CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files. CFX_ClipRgn is moved to core/fxge/ge because it is only used in core/fxge. The header for CFX_PathData is left in core/fxge/include since it is used elsewhere.
Review-Url: https://codereview.chromium.org/2216853004
|
|
And use it where appropriate.
Review-Url: https://codereview.chromium.org/2224623002
|
|
This is the first CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files.
Review-Url: https://codereview.chromium.org/2217663002
|
|
This CL splits the header file apart. The cpp files are not touched as part
of this CL, they will be done as a followup. This de-duplicates the fpdf_doc.h
BUG=pdfium:249
Review-Url: https://codereview.chromium.org/2183313004
|
|
Review-Url: https://codereview.chromium.org/2183933002
|
|
This macro isn't buying us anything and reduces transparency.
Review-Url: https://codereview.chromium.org/2179953002
|
|
Use unique_ptr for class owned member variables. Also clean up some
style issues such as removing unused functions and casting to raw pointer.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2163103002
|
|
Use unique_ptr for class owned member variables, and remove unnecessary
or unused functions and member variable.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2149903002
|
|
Also clear up a few variable names and unnecessary brackets.
Review-Url: https://codereview.chromium.org/2143083002
|
|
Replace raw member variables to smart pointer type to better
maintain the ownership and to ease the management.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2136683002
|
|
Also did some cleanups such as removing an unused member variables and some unused structs.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2119013002
|
|
The dash parameters where not copied; the copy
could point at random data and cause corpus
tests to hang when testing Skia.
PDFium measures text directly by calling FreeType.
Turn off hinting altogether in Skia so that drawn
text matches the metrics that PDFium measures.
Premultiply bits retrieved from images, and check
to see that the device bits are always
premultiplied.
Look for null graphics state and matrices.
R=thestig@chromium.org,dsinclair@chromium.org
BUG=pdfium:532
Review-Url: https://codereview.chromium.org/2120353004
|
|
Add checks to pass unit tests.
R=thestig@chromium.org,dsinclair@chromium.org
BUG=pdfium:525, pdfium:526, pdfium:527, pdfium:528, pdfium:529
Review-Url: https://codereview.chromium.org/2111553003
|
|
BUG=pdfium:525,pdfium:526
Review-Url: https://codereview.chromium.org/2106043002
|
|
Review-Url: https://codereview.chromium.org/2093313002
|
|
Review-Url: https://codereview.chromium.org/2093033004
|
|
Move ifx_renderdevicedriver class to its own file to share with
multiple devices to reduce code duplication.
Review-Url: https://codereview.chromium.org/2078783002
|
|
- Clean up CFX_GEModule.
- Remove duplicate #defines in fx_ge.h
- Remove IsFontStyleFromCharCode() that always returns true.
- Mark a FXTEXT_CHARPOS field as Mac only.
Review-Url: https://codereview.chromium.org/2075333002
|
|
Review-Url: https://codereview.chromium.org/2059883004
|
|
This change contains files in core/fpdfapi directory. This is part
of the efforts to make PDFium code compilable by Clang chromium
style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2060973002
|
|
Explicitly invoke GetObject() method instead. This avoids
having code where it looks like non-pointers are assigned to
pointers but works due to the cast operator.
Review-Url: https://codereview.chromium.org/2045083003
|
|
Review-Url: https://codereview.chromium.org/2032613003
|
|
CFX_PSRenderer, IFX_PSOutput, CPSOutput, CPSPrinterDriver.
Also reland commit 2d63eaa.
Review-Url: https://codereview.chromium.org/2019603002
|
|
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
|
|
BUG=616248
Review-Url: https://codereview.chromium.org/2020183004
|
|
Remove unused dithering code.
Review-Url: https://codereview.chromium.org/2010813003
|
|
- 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
|
|
Review-Url: https://codereview.chromium.org/2000973002
|
|
Review-Url: https://codereview.chromium.org/1999553002
|
|
... 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
|
|
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
|
|
Review-Url: https://codereview.chromium.org/1973913002
|
|
- 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
|
|
Investigate results of:
git grep -ni 'return [(]*[a-z0-9_]* &[^&]'
git grep -ni 'BOOL.*= [(]*[a-z0-9_]* &[^&]'
Review-Url: https://codereview.chromium.org/1951653002
|
|
This CL removes the interfaces:
* IPDF_ObjectRenderer
* IPDF_OCContext
* IPDF_RenderModule
* IPDF_PageModule
The CPDF_RenderModule was just wrapping new and delete calls. This Cl moves
those up to the callers and removes the CPDF_RenderModule class.
Review URL: https://codereview.chromium.org/1918323003
|