freetype2/src/truetype
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
..
module.mk Update all copyright notices. 2023-01-17 09:18:25 +01:00
rules.mk Update all copyright notices. 2023-01-17 09:18:25 +01:00
truetype.c Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttdriver.c * src/truetype/*: Clean up interface. 2023-05-07 14:59:50 +02:00
ttdriver.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
tterrors.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttgload.c Add new load flag `FT_LOAD_NO_SVG`. 2023-05-15 16:04:15 +02:00
ttgload.h Update all copyright notices. 2023-01-17 09:18:25 +01:00
ttgxvar.c [truetype] Reduce heap allocation of `deltaSet` variation data. 2023-05-19 06:50:28 +02:00
ttgxvar.h * src/truetype/*: Clean up interface. 2023-05-07 14:59:50 +02:00
ttinterp.c [truetype] Signature fixes. 2023-05-07 14:59:50 +02:00
ttinterp.h [truetype] Signature fixes. 2023-05-07 14:59:50 +02:00
ttobjs.c * src/truetype/*: Clean up interface. 2023-05-07 14:59:50 +02:00
ttobjs.h [truetype] tt_size_reset_height to take FT_Size 2023-04-17 12:32:04 -04:00
ttpload.c * src/truetype/*: Clean up interface. 2023-05-07 14:59:50 +02:00
ttpload.h * src/truetype/*: Clean up interface. 2023-05-07 14:59:50 +02:00
ttsubpix.c * src/*: Replace leading underscores with trailing ones in dummy variables. 2023-02-26 20:18:54 +01:00
ttsubpix.h Update all copyright notices. 2023-01-17 09:18:25 +01:00