summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_cmap.h
AgeCommit message (Collapse)Author
2018-09-13Reland "Make things more const-y"chromium/3552Tom Sepez
This reverts commit 5700d9e2eea5813861920995815ac092fd7df973. Reason for revert: Harmless, I think. Original change's description: > Revert "Make things more const-y" > > This reverts commit 882ed81dec7afc5bc106f965af34f1e59407fd95. > > Reason for revert: Rule out that this be making embeddertest flakey. > Seems improbable, but maybe the const is allowing the compiler to use stale data in a non-logically const operation ??? > > Original change's description: > > Make things more const-y > > > > Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350 > > to use const more in the changed code. > > > > BUG=chromium:881678 > > > > Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33 > > Reviewed-on: https://pdfium-review.googlesource.com/42370 > > Commit-Queue: Ryan Harrison <rharrison@chromium.org> > > Reviewed-by: Lei Zhang <thestig@chromium.org> > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org > > Change-Id: Ifee656f151d3e6dab6de33c3b96b37b9809004c4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:881678 > Reviewed-on: https://pdfium-review.googlesource.com/42372 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: I24de62969b039288596aa4d0b268ad49728e4891 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:881678 Reviewed-on: https://pdfium-review.googlesource.com/42393 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Revert "Make things more const-y"Tom Sepez
This reverts commit 882ed81dec7afc5bc106f965af34f1e59407fd95. Reason for revert: Rule out that this be making embeddertest flakey. Seems improbable, but maybe the const is allowing the compiler to use stale data in a non-logically const operation ??? Original change's description: > Make things more const-y > > Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350 > to use const more in the changed code. > > BUG=chromium:881678 > > Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33 > Reviewed-on: https://pdfium-review.googlesource.com/42370 > Commit-Queue: Ryan Harrison <rharrison@chromium.org> > Reviewed-by: Lei Zhang <thestig@chromium.org> > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: Ifee656f151d3e6dab6de33c3b96b37b9809004c4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:881678 Reviewed-on: https://pdfium-review.googlesource.com/42372 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Make things more const-yRyan Harrison
Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350 to use const more in the changed code. BUG=chromium:881678 Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33 Reviewed-on: https://pdfium-review.googlesource.com/42370 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-09-12Optimize CPDF_CMapParserRyan Harrison
In this parser, a vector of CodeRange values are built up during operations that need to be sync'd with the CPDF_CMap that is being initialized. In the existing implementation, the vector being built as a member var for the parser, and copying the values over to the cmap whenever there is a change. When profiling, this copy is where the code spends most of its time. The code has been rewritten to have the parser reference/modify the instance of the vector in the cmap instead of having its own copy. This removes all of the copies and significantly speeds things up. BUG=chromium:881678 Change-Id: Ib8e75962507ca3d3b1ed066fd1faa4fbb7141122 Reviewed-on: https://pdfium-review.googlesource.com/42350 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-08-27The final game: mark everything final.Tom Sepez
Then revert the ones that break compilation. Fix one IWYU noticed during presubmit. Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7 Reviewed-on: https://pdfium-review.googlesource.com/41470 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-23Remove bool bPromptCJK argument (several places)Tom Sepez
It gets computed, and passed around, but in the end no decisions are made because of it. Change-Id: If67f6f0cd0c37e52993832be1fb83498fd851914 Reviewed-on: https://pdfium-review.googlesource.com/41190 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-09Change CPDF_Font::GetNextChar()'s in-out parameter to pass by pointer.chromium/3518Lei Zhang
Instead of passing by non-const reference. Adjust the override in CPDF_CIDFont and CPDF_CMap::GetNextChar() as well. Change-Id: I0ee6dc21077101cbeeb0e334498075fc463a2d65 Reviewed-on: https://pdfium-review.googlesource.com/39492 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-06-26Use unowned ptr in CPDF_CmapTom Sepez
Change-Id: Id6551957405605cf273d5d100b6db9c27ecc6e7c Reviewed-on: https://pdfium-review.googlesource.com/36131 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-09Use ByteStringView / pdfium::span in CPDF font as appropriate.chromium/3393Tom Sepez
Change-Id: I92c7ba605bf95a9023ad046b8dddebe0a0592802 Reviewed-on: https://pdfium-review.googlesource.com/29992 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-09Use pdfium::span<> in CFX_BitStream, CPDF_SimpleParser.Tom Sepez
Get bounds checks in parsers automatically when using spans. Change-Id: I71fbe7b838435d455376db2f89817d807a9cdcfd Reviewed-on: https://pdfium-review.googlesource.com/29830 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-28Use ByteStringView in parsersDan Sinclair
This CL converts the CPDF_SimpleParser to accept a ByteStringView. Several of the callers of SimpleParser are also updated to use a ByteStringView instead of <char*,size>. Change-Id: Ic2df3a06f92e77b53745a0419b44368142f9d8e6 Reviewed-on: https://pdfium-review.googlesource.com/29351 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-04Remove CPDF_CMap friendsDan Sinclair
This CL removes the friends from CPDF_CMap and adds accessors for the needed items. Change-Id: Icf7b3e639c0904209f7db80c9460146cd29dd78a Reviewed-on: https://pdfium-review.googlesource.com/15452 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-09-27Remove FX_STRSIZE and replace with size_tRyan Harrison
BUG=pdfium:828 Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16 Reviewed-on: https://pdfium-review.googlesource.com/13230 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-09-21Rename CFX_RetainPtr to RetainPtrDan Sinclair
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-31Remove fx_basic.hDan Sinclair
This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-30Convert int* references to FX_STRSIZERyan Harrison
Through out the code base there are numerous places where variables are declared using a signed integer type when interacting with the string classes, since they assume that FX_STRSIZE is 'int'. As part of changing the underling type of FX_STRSIZE to be unsigned, these locations are being changed to use FX_STRSIZE. This is necessary as part of converting the type, but has been broken off into a separate CL, since it should be low risk. Some related cleanups that are low risk are included as part of this CL. BUG=pdfium:828 Change-Id: Ifaae54ad195ccde0fe8672f71271d29a6ebd65fd Reviewed-on: https://pdfium-review.googlesource.com/12210 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-05-26Use proper file names in core/fpdfapi/fontNicolas Pena
This CL splits up font_int.h into files by classes. It also renames the unittests to match the class being tested. Finally, it renames the ttgsubtable files to match the class name. Change-Id: I6187caa9e82d12b9a66e955113fe327d52042ae0 Reviewed-on: https://pdfium-review.googlesource.com/6090 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>