freetype2/include/freetype/internal
Seigo Nonaka 115e927540 [truetype] Reduce heap allocation of `deltaSet` variation data.
`deltaSet` is an array of packed integers that can be 32 bits, 16 bits, or
8 bits.  Before this change, these values were unpacked to 32-bit integers.
However, this can cause big heap allocations, e.g., around 500 KByte for
'NotoSansCJK'.  To reduce this amount, store the packed integers and unpack
them just before passing to the calculation.  At calculation time, due to
the variable length of region indices, temporary heap allocations are
necessary.  This heap allocation is not negligible and visible in `ftbench`
results.  So, use stack-allocated arrays for short array calculations.

Fixes #1230.

* include/freetype/internal/ftmmtypes.h (GX_ItemVarDataRec): New fields
`wordDeltaCount` and `longWords`.

* src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Load packed
data.
(tt_var_get_item_delta): Unpack data before applying.
2023-05-19 06:50:28 +02:00
..
services [truetype] Fix PostScript name handling for variation fonts. 2023-05-06 18:53:50 +02:00
autohint.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
cffotypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
cfftypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
compiler-macros.h * include/freetype/internal/compiler-macros.h (FALL_THROUGH): Update. 2023-03-01 06:36:59 +01:00
ftcalc.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftdebug.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftdrv.h [cid] Improve tracing messages; formatting. 2023-05-06 16:41:13 +02:00
ftgloadr.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fthash.h Remove redundant inclusion of `ft2build.h'. 2020-06-13 21:15:45 +02:00
ftmemory.h Avoid reserved identifiers that are globally defined. 2023-02-08 21:09:30 +01:00
ftmmtypes.h [truetype] Reduce heap allocation of `deltaSet` variation data. 2023-05-19 06:50:28 +02:00
ftobjs.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftpsprop.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftrfork.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftserv.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftstream.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
fttrace.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ftvalid.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
psaux.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
pshints.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
sfnt.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
svginterface.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
t1types.h * include/freetype/internal/t1types.h: Fix the indentation. 2023-05-12 09:49:58 +09:00
tttypes.h [truetype] Fix style name handling for variation fonts. 2023-05-06 18:53:50 +02:00
wofftypes.h Update all copyright notices. 2023-01-17 09:18:25 +01:00