Age | Commit message (Collapse) | Author |
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2393593002
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392603004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2386423004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392773003
|
|
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/2374383003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2376153004
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382763002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383543002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2379033002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2375283003
|
|
All usage were refactored in commit 9972ff99.
Review-Url: https://codereview.chromium.org/2377203002
|
|
This reverts commit fe0179ded8202939ea4f2b92a879b8dede7821ea.
This is blocking incremental revision, will try again.
Review-Url: https://codereview.chromium.org/2377033003
|
|
This better describes its purpose, and reduces confusion
with the CFX_CountRef class, which is unrelated.
The WeakPtr class itself that manipulates handles is NYI.
Review-Url: https://codereview.chromium.org/2366673003
|
|
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
|
|
BUG=647612
Review-Url: https://codereview.chromium.org/2350193003
|
|
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
|
|
CPDF_ImageRenderer::StartDIBSource.
Correct the compare logic in CPDF_ImageRenderer::StartDIBSource() by using size_t instead of int.
BUG=chromium:645036
R=ochang@chromium.org
Review-Url: https://codereview.chromium.org/2323663002
|
|
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
|
|
This CL updates all of the includes to be correctly sorted. A PRESUBMIT warning
is added (from chromium) that will warn if the includes are in the wrong order on upload.
Review-Url: https://codereview.chromium.org/2337293002
|
|
Previously, PDFium only supported widget annotations to draw forms. As
we've implemented other annotations, the behavior of
FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw changed. So, this CL
clearly defines what needs to be done in FPDF_RenderPageBitmap_Retail
and FPDF_FFLDraw.
This CL first assumes that PDFium users will always call
FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw to render PDF pages,
because otherwise they are not able to support PDF forms.
FPDF_RenderPageBitmap_Retail should only deal with non-widget
annotations, such as highlight, underline, text, etc. If
FPDF_ANNOT flag is passed, non-widget annotations are drawn. Otherwise,
they are hidden.
FPDF_FFLDraw should only deal with annotations that requires
user-interaction, such as widget annotations and popup annotation. Since
popup annotation is associated with non-widget annotation, they should
not be drawn if the associated annotation is hidden. Thus, if FPDF_ANNOT
flag is passed, popup annotations are drawn. Otherwise, they are hidden.
Widget annotations should be always drawn regardless of FPDF_ANNOT flag
since they need to be always displayed for PDF forms.
Also, roll DEPS for testing/corpus to 8485b30.
BUG=pdfium:594
Review-Url: https://codereview.chromium.org/2323203002
|
|
We know the values are always valid at this point, so use ValueOrDie instead
of ValueOrDefault.
BUG=chromium:637984
Review-Url: https://codereview.chromium.org/2319343003
|
|
Verify the provided image size is within bounds before loading.
BUG=chromium:639160
Review-Url: https://codereview.chromium.org/2323473002
|
|
When calculating the starting x and y for a pattern it is possible to overflow
the int value. Use checked math to make sure we don't overflow.
BUG=chromium:637984
Review-Url: https://codereview.chromium.org/2317283002
|
|
Use the shared copy-on-write version instead of the underlying
CFX_GraphStateData since it may not always get modified.
Review-Url: https://codereview.chromium.org/2316823002
|
|
The FX layer is spying on its private data, so make the job
of ref-counting it live in FX as well, instead of up a layer
at pdfapi.
Pre-cursor to making this private and passing the graph
state itself everywhere.
Review-Url: https://codereview.chromium.org/2314223002
|
|
Review-Url: https://codereview.chromium.org/2311313002
|
|
The default assignment operator will suffice and allows
us to write matrix1 = matrix2;
Review-Url: https://codereview.chromium.org/2307953003
|
|
All interaction goes through the CPDF_GeneralState, which
manages the underlying storage transparently to the callers.
Make StateData use a real string and a real matrix rather
than C-style arrays.
Review-Url: https://codereview.chromium.org/2302683002
|
|
Review-Url: https://codereview.chromium.org/2305103002
|
|
Remove a const cast along the way and propagate to callers.
Review-Url: https://codereview.chromium.org/2303553002
|
|
Review-Url: https://codereview.chromium.org/2298163004
|
|
Review-Url: https://codereview.chromium.org/2294133002
|
|
Get callers out of the copy-before-write business, and let the
class manage it instead.
Review-Url: https://codereview.chromium.org/2292363002
|
|
Review-Url: https://codereview.chromium.org/2287313004
|
|
This reverts commit c10c23a2b1999b1cb0354fd4db9837dc63a3d833.
TBR=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2285283003
|
|
This reverts commit d09a09751f724ecdb1a0bc307447a3d0c212ebff.
TBR=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2291833002
|
|
This reverts commit 91ddd3f7501429222f648b986a99f3959a398889.
Reason for revert: may introduce sublte bugs, more thought required.
TBR=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2294553002
|
|
Move methods to CPDF_ColorStateData.
Move MakePrivateCopy() methods to call sites.
Remove now-empty cpdf_colorstate.cpp file.
Review-Url: https://codereview.chromium.org/2291763002
|
|
These just invoked exaclty the same methodes in the underlying
xxxData class, which we can now do with just a ->()
Move some methods to the xxxData class, where they belong.
In doing so, put MakePrivateCopy() calls at each callsite
for those methods that made a copy.
Review-Url: https://codereview.chromium.org/2286983002
|
|
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
|