summaryrefslogtreecommitdiff
path: root/core/fxge/ge/cfx_facecache.cpp
AgeCommit message (Collapse)Author
2017-03-14Replace FX_FLOAT with underlying float type.Dan Sinclair
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-09Cleanup CFX_Matrix related methodsDan Sinclair
This CL removes unused CFX_Matrix methods and cleans up the implementaion of others. Change-Id: I72d1d10d4a45cc9341a980054df5225e52a0c4f2 Reviewed-on: https://pdfium-review.googlesource.com/2574 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-11-21Fixup lint flags.Dan Sinclair
The -build/include setting was masking out build/include_what_you_use. This CL restores them, fixes any build errors, and adds NOLINT as needed. As well, the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd. lint cleanups Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f Reviewed-on: https://pdfium-review.googlesource.com/2030 Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-11-21use skia textcaryclark
This adds text to the _SUPPORT_SKIA_PATHS_ variant. The output of the test corpus has more differences, but no feature changes or dropouts that I can see. The text is a bit lighter. Bungeman thinks this is because of our support of SRGB color, although the fonts also look different so maybe there's more to the story. The output looks compatible with the variations I see in Adobe Reader and Firefox on the same platform. There's probably more text tuning to do. Additionally, this turns off the caching feature for this variation. Caching can't work because the drawing alternates between Skia and PDFium's native blits, so any state caching won't know about changes and drawing performed by the other. R=dsinclair@chromium.org, bungeman@chromium.org Review-Url: https://codereview.chromium.org/2520483002
2016-11-02Remove FX_BOOL from coretsepez
Review-Url: https://codereview.chromium.org/2477443002
2016-09-29Move core/fxge/include to core/fxgedsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2377393002
2016-09-20Refactor CFX_FontCache to have only one in GE Module.art-snake
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
2016-09-19Revert of Pdfium: Fix fonts leaking on ClosePage. (patchset #10 id:180001 of ↵dsinclair
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
2016-09-15Fix memory leaking on ClosePage.chromium/2862art-snake
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
2016-09-14Map glyph bitmap in LookUpGlyphBitmap even when unsuccessfulnpm
CFX_FaceCache::LookUpGlyphBitMap should remember its unsuccessful glyph bitmap calculations. This is especially important if there are a lot of repeated requests for the same glyph with large bitmaps (which means long calculations in freetype). With this CL, the pdf in the bug below will be rendered quickly. BUG=chromium:638856 Review-Url: https://codereview.chromium.org/2338883004
2016-08-31Attempt to fix potential integer overflow in CFX_FaceCache::LoadGlyphPath().chromium/2846thestig
BUG=641333 Review-Url: https://codereview.chromium.org/2294183002
2016-08-31Use CheckedNumeric for strength calculation.dsinclair
Update the calculation of the outlines bold strength to use a CheckedNum instead of an int. BUG=chromium:639506 Review-Url: https://codereview.chromium.org/2296193002
2016-08-29Move CFX_SubstFont and CTTFontDesc into their own filesnpm
Review-Url: https://codereview.chromium.org/2292503002
2016-08-19Move CFX_FaceCache to its own filenpm
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