Age | Commit message (Collapse) | Author |
|
Skia's interface to transfer modes is
not described by an enum instead
of a class.
R=reed@google.com, dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2394683004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392603004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2386423004
|
|
Update clip to use intersect verb
from canvas.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2384283002
|
|
Review-Url: https://codereview.chromium.org/2386273004
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2384503003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2377393002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2381063002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383543002
|
|
After this CL: only one global CFX_FontCache used. Any cached items
from it, are released, when they are not being used.
This is restore part of reverted CL:
Original CL: https://codereview.chromium.org/2158023002
Revert reason: BUG=647612
Fix bug CL: https://codereview.chromium.org/2350193003
Review-Url: https://codereview.chromium.org/2350243002
|
|
https://codereview.chromium.org/2158023002/ )
Reason for revert:
Causes heap-use-after-free. See crbug.com/647612.
Original issue's description:
> Fix memory leaking on ClosePage.
> CFX_FontCache refactoring:
> after this CL: Only one global CFX_FontCache used. Any cached items from it, are released, when its are not used.
>
> BUG=79367,48791
>
> The fonts was not cleared after unloading pages.
>
> Test pdf:
>
> http://www.nasa.gov/pdf/750614main_NASA_FY_2014_Budget_Estimates-508.pdf
>
> For this file, we have ~5 fonts per page, which equal ~1 Mb per page.
> In this PDF we have 670 pages, as result after slow scrolling(reading) full document we have ~600 Mb fonts data in memory.
>
> memory usage of PDF Plugin:
> before this CL: ~660 Mb
> after this CL: ~100 Mb
>
> Committed: https://pdfium.googlesource.com/pdfium/+/cde5101eb15b24519e89fa500fe37038bc8e2201
TBR=tsepez@chromium.org,brucedawson@chromium.org,npm@chromium.org,art-snake@yandex-team.ru
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=79367,48791
Review-Url: https://codereview.chromium.org/2350763002
|
|
CFX_FontCache refactoring:
after this CL: Only one global CFX_FontCache used. Any cached items from it, are released, when its are not used.
BUG=79367,48791
The fonts was not cleared after unloading pages.
Test pdf:
http://www.nasa.gov/pdf/750614main_NASA_FY_2014_Budget_Estimates-508.pdf
For this file, we have ~5 fonts per page, which equal ~1 Mb per page.
In this PDF we have 670 pages, as result after slow scrolling(reading) full document we have ~600 Mb fonts data in memory.
memory usage of PDF Plugin:
before this CL: ~660 Mb
after this CL: ~100 Mb
Review-Url: https://codereview.chromium.org/2158023002
|
|
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For.
BUG=pdfium:596
Review-Url: https://codereview.chromium.org/2334323005
|
|
BUG=pdfium:562
Review-Url: https://codereview.chromium.org/2257313002
|
|
Moved classes CFX_FontCache and CFX_AutoFontCache into a separate file.
Review-Url: https://codereview.chromium.org/2246223002
|
|
Recent Skia driver addition of 8 bit src / 8 bit dst workaround
needs to check for a nullptr bitmap.
R==dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2255763002
|
|
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
|
|
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
|
|
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
|
|
The text matrix for Skia is still wrong.
The last fix allowed text to draw correctly when rotated,
but did not draw correctly when skewed.
With this edit, text draws correctly rotated, skewed
horizontally, skewed vertically, and rotated and skewed.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2189093002
|
|
My initial guess for text rotation worked for scaled
but not skewed or rotated.
R=dsinclair@chromium.org,reed@google.com
Review-Url: https://codereview.chromium.org/2178623002
|
|
Add back one function which is only used by Skia code. And make a couple small
fixes.
Review-Url: https://codereview.chromium.org/2167383002
|
|
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
|
|
testing/corpus/fx/path/path_10_jd.pdf
sets the document to null. (It can't
be read at all by MacOS Preview.)
This causes the font cache to also
be null. In this case, get the font
cache from CFX_GEModule instead.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2128043004
|
|
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
|
|
PDFium assumes the lowest common denominator
and draws many strings and paths that can
be accumulated.
Defer canvas->restore() calls until required
because the clip changed.
Defer text and path draws as long as subsequent
calls concatenate additional data.
Include debugging switch to allow disabling cache
at compile-time while bugs are shaken out.
Review-Url: https://codereview.chromium.org/2064753002
|
|
Review-Url: https://codereview.chromium.org/2075383002
|
|
Move ifx_renderdevicedriver class to its own file to share with
multiple devices to reduce code duplication.
Review-Url: https://codereview.chromium.org/2078783002
|
|
These changes are specific to Mac and Skia builds. They are
needed for these builds to compile with clang_use_chrome_plugin.
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2081523002
|
|
Add out-of-line implementations to Skia as well.
R=weili@chromium.org,dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2072493002
|
|
Review-Url: https://codereview.chromium.org/2059883004
|
|
Use SkCanvas::drawPosText() to render the whole string
rather than drawing glyphs one at a time.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2057343002
|
|
Review-Url: https://codereview.chromium.org/2032613003
|
|
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
|
|
Remove unused dithering code.
Review-Url: https://codereview.chromium.org/2010813003
|
|
Fix 2/4/8 bits per pixel bitmaps
that PDFium transposes into 8 bpp
indexed.
R=tsepez@chromium.org,dsinclair@chromium.org,reed@google.com
Review-Url: https://codereview.chromium.org/2011153002
|
|
Review-Url: https://codereview.chromium.org/2009803003
|
|
Review-Url: https://codereview.chromium.org/2017503002
|
|
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
|
|
Match the matrix supplied by PDFium to the one expected
by Skia to draw bitmaps.
Set up the color if the bitmap is an image mask.
Additional work required to figure out when bitmap
filtering should be applied.
R=reed@google.com,dsinclair@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2004203003
|
|
Review-Url: https://codereview.chromium.org/1990153003
|
|
Review-Url: https://codereview.chromium.org/1996533004
|
|
This removes the last vestiges of antigrain from
a Skia-specific build.
R=dsinclair@chromium.org,tsepez@chromium.org,thestig@chromium.org,reed@google.com
Review-Url: https://codereview.chromium.org/1998623002
|
|
PDFium uses fxge to denote the graphics engine used
for general rendering. When pdf_use_skia=1 is set,
use Skia as the default engine instead of antigrain.
R=tsepez@chromium.org,dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/1975143002
|
|
R=tsepez@chromium.org,thestig@chromium.org
Review-Url: https://codereview.chromium.org/1975823002
|
|
The Skia variant generates a couple of warnings on the linux build.
One of the warning silenced is an unused variable. Once PDFs are
identified that exercise this variable, the dummy code will be
replaced.
R=tsepez@chromium.org
Review-Url: https://codereview.chromium.org/1962683002
|
|
The first PDF attempted by the Skia infra team
uncovered three bugs. This gets past those bugs
crashing; more work to do to get the correct
output.
R=rmistry@google.com,dsinclair@chromium.org
BUG=skia:5183
Review URL: https://codereview.chromium.org/1887073002
|