Age | Commit message (Collapse) | Author |
|
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 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
|
|
Review-Url: https://codereview.chromium.org/2292503002
|
|
Moved classes CFX_FontCache and CFX_AutoFontCache into a separate file.
Review-Url: https://codereview.chromium.org/2246223002
|
|
The two methods in fgas_system also exist in core/fxcrt/include/fx_ext with the
FXSYS_ prefix instead of FX_. Remove the fgas_system files and use the
fx_ext versions instead.
Review-Url: https://codereview.chromium.org/2233133002
|
|
This Cl fixes the CFDE_XMLSyntaxParser::ParseTextChar() to handle entities
where the value goes negative. Currently this could cause an undefined-shift
as due to the (ch << 4) calls. Instead, detect if the value has gone negative
and return a space character.
BUG=chromium:603489
Review-Url: https://codereview.chromium.org/2223823003
|
|
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
|
|
Use smart pointer to replace raw pointer type for class
owned member variables so that memory management will
be easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2208423002
|
|
For the class owned member variables, use std::unique_ptr or
std::vector for memory management.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2169793002
|
|
Review-Url: https://codereview.chromium.org/2166833002
|
|
This CL removes unused methods and default parameters from the fgas/crt code.
Review-Url: https://codereview.chromium.org/2162503003
|
|
Change m_pXMLDoc and m_pStream in CXFA_SimpleParser to be a unique_ptr. This
allows removing the CloseParser() call from CXFA_DocumentParser as the items
will get cleaned up automatically.
Review-Url: https://codereview.chromium.org/2131653002
|
|
This CL converts all NULL's to nullptr. All instances of comparison to nullptr
have been removed.
Review-Url: https://codereview.chromium.org/2095653002
|
|
Fix nits along the way.
Review-Url: https://codereview.chromium.org/2083943003
|
|
- 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
|
|
This change mainly contains files in xfa/ and fxjse/ directories
which were not covered by previous changes.
This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins. After this change, PDFium can be
compiled with "clang_use_chrome_plugin=true" for GN build. Since
clang_use_chrome_plugin is true by default, we no longer need to
set this parameter explicitly.
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/2072803002
|
|
This Cl removes the CFDE_XMLSAXParser and CFDE_XMLDOMParser along with the
::LoadXML() method which would create them, it was never called. It also
cleans up the use of virtual in the various XML classes.
Review-Url: https://codereview.chromium.org/2067253002
|
|
Make CFDE_TxtEdtParag::m_lpData a int32_t*, not void*, since
it is cast to int32_t everywhere it is used.
Many fxbarcode casts are redundant, likely the result of
previous generic PtrArray replacement with templated type.
Review-Url: https://codereview.chromium.org/2059953002
|
|
Review-Url: https://codereview.chromium.org/2039923004
|
|
Replacing a void* member in CFX_SAXItem saves lots of casts.
Review-Url: https://codereview.chromium.org/2051233002
|
|
Review-Url: https://codereview.chromium.org/2040323004
|
|
Review-Url: https://codereview.chromium.org/2037563002
|
|
Review-Url: https://codereview.chromium.org/2032613003
|
|
This CL removes the FDE_HVISUALOBJ in favour of the concrete FDE_TEXTEDITPIECE
class. The parameter was removed from any method which didn't use it and the
non-implemented methods were removed.
Review-Url: https://codereview.chromium.org/2047693002
|
|
In turn, CFDE_TxtEdtBuf::SetChunkSize becomes unused.
Review-Url: https://codereview.chromium.org/2042743003
|
|
The value returned is always NULL and when passed as a param is never used.
Review-Url: https://codereview.chromium.org/2044623002
|
|
Then we can remove a bunch of casts.
Review-Url: https://codereview.chromium.org/2033243004
|
|
Avoid confusion with CFX_FontMgr, which does not inherit
from IFX_FontMgr, and lives in a different layer of code.
Do the same CFX_ -> CFGAS_ transformation for the concrete
classes that implement IFGAS_FontMgr.
Review-Url: https://codereview.chromium.org/2039463003
|
|
Avoid confusion with CFX_Font, which is defined in fxcrt,
and does not inherit from nor bear any resemblence to IFX_Font.
Review-Url: https://codereview.chromium.org/2036173003
|
|
Review-Url: https://codereview.chromium.org/2038913002
|
|
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
|
|
FX_WCHAR* casts were hiding a number of misuses of narrow strings in
pdfium, which /analyze identified. Now that those are fixed I did a
search for other instances of (FX_WCHAR*) to see if any other bugs
were lurking. No bugs were found but one unnecessary cast and one
that should be a const_cast were identified. This change fixes
those. No behavioral change.
Review-Url: https://codereview.chromium.org/2024463002
|
|
BUG=chromium:614962
Review-Url: https://codereview.chromium.org/2017803002
|
|
Remove unused dithering code.
Review-Url: https://codereview.chromium.org/2010813003
|
|
Review-Url: https://codereview.chromium.org/2009803003
|
|
Review-Url: https://codereview.chromium.org/2009253003
|
|
This CL replaces the last instance of CFX_DSPATemplate with std::binary_search.
Review-Url: https://codereview.chromium.org/2007443003
|
|
Rename addRef() method to Retain() to match Release().
This CL does not convert to CFX_RetainPtrs, which will happen
in a follow-on.
Review-Url: https://codereview.chromium.org/2005933002
|
|
This is part of efforts to bring XFA to chromium_code standard.
The warnings are from unreachable code, or using potentially
uninitialized variables, or using assignment within a condition.
This change list only contains easy to fix cases. More cleanups
will follow.
BUG=pdfium:29
Review-Url: https://codereview.chromium.org/1998873002
|
|
Get rid of some LPC typedefs while we're at it.
Review-Url: https://codereview.chromium.org/1990363003
|
|
This CL moves the fgas Sax parser into the fde/xml directory. This places
the parse with the other XML parser in the system.
Review-Url: https://codereview.chromium.org/1990003002
|
|
This CL shuffles code around in the fgas/ headers, removes unused functions
and adds anonymous namepaces for static methods and data.
Review-Url: https://codereview.chromium.org/1992033002
|
|
Sevearal typedefs are only used once or twice. Expand and remove the typedef.
Review-Url: https://codereview.chromium.org/1995033002
|
|
Review-Url: https://codereview.chromium.org/1988393002
|
|
Review-Url: https://codereview.chromium.org/1987223003
|
|
This CL splits the xfa/fee files into individual class files and moves them
into the xfa/fde directory where they belong.
Review-Url: https://codereview.chromium.org/1994693002
|