summaryrefslogtreecommitdiff
path: root/xfa/fgas/font/cfgas_fontmgr.h
AgeCommit message (Collapse)Author
2017-05-20Use observed ptrs from CFGAS_GEFont back to its font mgrs.chromium/3106Tom Sepez
CFGAS_GEFonts are ref counted, and its a good thing since they are managed by at least three different font managers: CFGAS_FontMgr, CXFA_PDFFontMgr, and CXFA_FontMgr. None of these have a clear claim to ownership of the CFGAS_GEFont. CFGAS_GEFont has back-pointers to two of these, CFGAS_FontMgr, and CXFA_PDFFontMgr, and they could each outlive the other. Thus the font needs to watch for destruction of either of its managers, so as to stop using it after its gone. Bug: 724640 Change-Id: I907ec35e300e11e532e13545d51fb200ac86b4f9 Reviewed-on: https://pdfium-review.googlesource.com/5735 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-04-20Cleanup the fx_extension code.Dan Sinclair
This CL cleans up the fx_extension file. The stream code was moved to fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its own file. Code shuffled from header to cpp file. Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf Reviewed-on: https://pdfium-review.googlesource.com/4371 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-04-19Move CFGAS_Stream to CFX_SeekableStreamProxyDan Sinclair
This CL moves the FGAS stream code into core/fxcrt and renames to CFX_SeekableStreamProxy. Change-Id: I6641fe0cca45a128ef3ec281b0b40f8d60296387 Reviewed-on: https://pdfium-review.googlesource.com/4311 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-04-18Rename IFGAS_Stream to CFGAS_StreamDan Sinclair
This CL replaces IFGAS_Stream with the only implementation CFGAS_Stream. The CreateReadStream and CreateWriteStream methods are removed in favour of calling MakeRetain directly. Change-Id: I882a89258f642e24fc3d631587db05652bd53ded Reviewed-on: https://pdfium-review.googlesource.com/4210 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-04-03Drop FXSYS_ from wide string methodsDan Sinclair
This Cl drops the FXSYS_ from wide string methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I46a7af5913e7897f7c4ba712a76540c12105818f Reviewed-on: https://pdfium-review.googlesource.com/3611 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-30Remove unnecessary FreeType include.Dominik Röttsches
BUG=706824 Change-Id: I7f2138689d8e0d93fcb100c0215c8cf6bde427de Reviewed-on: https://pdfium-review.googlesource.com/3392 Commit-Queue: Dominik Röttsches <drott@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-03-30Fix Chromium XFA buildDominik Röttsches
Remove unnecessary FreeType include. BUG=chromium:706824 Change-Id: If3006a047e9431d6bf4111da867a998994034f56 Reviewed-on: https://pdfium-review.googlesource.com/3391 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-03-30Rename fgas_stream to ifgas_streamDan Sinclair
This Cl renames the the fgas_stream files to match the internal ifgas_stream class. The majority of the code in ifgas_stream.cpp is moved into the anonymouse namespace. Change-Id: I0518103d61df077782d9ab26d0ac87485417f379 Reviewed-on: https://pdfium-review.googlesource.com/3370 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-15Replace FX_POSITION in GFGAS_FontMgr with boolDan Sinclair
Change-Id: Iddd99312aee6447c05be5633eead023a004e65e1 Reviewed-on: https://pdfium-review.googlesource.com/3034 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-14Replace FX_CHAR and FX_WCHAR with underlying types.Dan Sinclair
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8 Reviewed-on: https://pdfium-review.googlesource.com/2967 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-13Replace discrete array with a map.dan sinclair
There is one use of the discrete array, GFGAS_GEFont. This CL replaces that usage with a std::map and removes the fgas_util classes. Change-Id: Ic45812168e9487ebac08abaa131c58080a949d69 Reviewed-on: https://pdfium-review.googlesource.com/2953 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-02Use std::deque for CFX_FontDescriptorsTom Sepez
Change-Id: Ic6edc7740513075c2a738cc8897460af17bb0103 Reviewed-on: https://pdfium-review.googlesource.com/2895 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-01-10Strip out custom allocator codeDan Sinclair
This Cl replaces the custom IFX_MemoryAllocator code with new/delete as needed. Change-Id: Ie786f607c9e0b3035ffd87733bc3e29a4b6426d9 Reviewed-on: https://pdfium-review.googlesource.com/2164 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-10Remove more _LP* typedefs.tsepez
Code is much clearer when we use the actual types rather than this convention. Review-Url: https://codereview.chromium.org/2618993002
2017-01-09Tidy cfgas_fontmgr, remove custom sorting code.tsepez
Review-Url: https://codereview.chromium.org/2610813010
2017-01-06Remove CFX_MapPtrToPtr in xfa/fgas, part 2tsepez
Review-Url: https://codereview.chromium.org/2616623005
2017-01-05Properly ref-count CFGAS_GEFont with CFX_RetainPtr.tsepez
We worry about cyclical references, but no leaks found. Review-Url: https://codereview.chromium.org/2609423003
2016-12-08Replace CFX_WideStringArray with std::vectortsepez
Minimalist changes with the tidying of the code to use better loop iterators as a follow-up. Review-Url: https://codereview.chromium.org/2556963004
2016-12-07Replace CFX_ByteStringArray with std::vector.tsepez
Also convernt one nearby array to vector as well. Review-Url: https://codereview.chromium.org/2559903002
2016-12-07Properly ref count IFX_FileAccess.tsepez
Review-Url: https://codereview.chromium.org/2562563002
2016-12-07Refcount all the IFX_ stream classes all the time.tsepez
We can remove a lot of "bOwnsStream" logic in the process. Always pass these by const reference, in case the called method wants to hang on to the stream (one exception is where we stick a raw pointer into a void* slot in a context from another layer). Review-Url: https://codereview.chromium.org/2451493002
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-18Clean up CFGAS_FontMgrchromium/2925npm
Review-Url: https://codereview.chromium.org/2512213002
2016-11-11Remove IFGAS_FontMgr and clean up (the renamed) CFGAS_FontMgr a little.npm
IFGAS_FontMgr is an interface only for a class only defined on Windows, plus a class only defined for non-Windows. I'm removing the interface, renaming the class to have the same name in both cases, and cleaning up a bit of unused methods. Review-Url: https://codereview.chromium.org/2494883002