Commit Graph

94 Commits

Author SHA1 Message Date
Behdad Esfahbod c8486b6301 [open-type] Add to_int to fixed types
To make sure we don't accidentally forget to_float().
As we did recently in COLRv1 code.
2023-01-07 14:15:17 -07:00
Behdad Esfahbod 8e46870093 [gvar] Take coords in instead of font in apply_deltas_to_points 2022-12-09 18:35:30 -07:00
Behdad Esfahbod 0545949f01 [gvar] Minor use array get_size() 2022-12-04 12:44:09 -07:00
Behdad Esfahbod 44be8ef4ce [gvar] Skip degenerate all-untouched delta-sets 2022-11-22 14:21:25 -07:00
Behdad Esfahbod 656bb223f1 [gvar] Micro-optimize unpack_points 2022-11-22 14:16:40 -07:00
Behdad Esfahbod a383027262 [gvar] Cosmetic 2022-11-22 14:15:17 -07:00
Behdad Esfahbod be89919a70 [gvar] is_valid() remove a check
I don't know why this check was there, but it doesn't make sense
because that function never returns 0 / false.
2022-11-22 13:56:20 -07:00
Behdad Esfahbod e8ddf107d0 [gvar] Optimize a loop 2022-11-22 13:29:32 -07:00
Behdad Esfahbod dd6fcec92c [gvar] Remove a conditional 2022-11-22 13:27:40 -07:00
Behdad Esfahbod a02317238a [gvar] Refactor deltas array access 2022-11-22 13:24:39 -07:00
Behdad Esfahbod c34c77698c [gvar] Don't try IUP if all points are specified 2022-11-22 13:21:01 -07:00
Behdad Esfahbod 27c4037e59 [gvar] Micro-optimize boundary-checking 2022-11-22 13:12:22 -07:00
Behdad Esfahbod ab8346fb6f [gvar] Add an unlikely 2022-11-22 13:07:39 -07:00
Behdad Esfahbod 1e8a342ea2 [gvar] Micro-optimize int types 2022-11-22 13:04:32 -07:00
Behdad Esfahbod 59c45f6deb Use hb_memcpy instead of memcpy consistently 2022-11-22 12:54:50 -07:00
Behdad Esfahbod 2968dd7844 [gvar] Optimize as_array() access 2022-11-22 11:57:29 -07:00
Behdad Esfahbod bb3bb76450 [gvar] Optimize scalar = 1.0 case 2022-11-22 11:53:35 -07:00
Behdad Esfahbod 2d098d5d7f [gvar] Use memset 2022-11-22 11:51:04 -07:00
Behdad Esfahbod e630a65e60 [gvar] Micro-optize vector extend 2022-11-22 11:29:13 -07:00
Behdad Esfahbod 49d4f62135 [gvar] Micro-optimize 2022-11-22 11:14:56 -07:00
Behdad Esfahbod 16ec9dcc1b [gvar] Whitespace 2022-11-22 10:55:16 -07:00
Behdad Esfahbod 72059a4789 [gvar] Optimize IUP alg 2022-11-22 10:41:37 -07:00
Behdad Esfahbod ee9873b5ed [gvar] Disable initializing vectors when not necessary 2022-11-22 10:23:17 -07:00
Behdad Esfahbod a2059f8f55 [gvar] Optimize unpack_points 2022-11-22 10:16:21 -07:00
Behdad Esfahbod 6d7206b68b [gvar] Optimize unpack_deltas 2022-11-22 10:13:14 -07:00
Behdad Esfahbod 2e86700e30 [gvar] Add memory-barrier as in ArrayOf 2022-11-21 12:28:10 -07:00
Behdad Esfahbod 4be074e2cb [gvar] Whitespace 2022-06-27 16:12:42 -06:00
Behdad Esfahbod a96647841a [gvar] Optimize apply_deltas_to_points 2022-06-27 15:41:02 -06:00
Behdad Esfahbod e9af9062c0 [gvar] Optimize unpack_deltas 2022-06-27 15:38:42 -06:00
Behdad Esfahbod 573e77280b [gvar] Optimize unpack_deltas 2022-06-27 15:35:28 -06:00
Behdad Esfahbod 698f51464c [gvar] Share vector allocation across delta-sets 2022-06-27 15:30:19 -06:00
Behdad Esfahbod 39e280c256 [gvar] Handle a couple of error conditions 2022-06-27 15:28:30 -06:00
Behdad Esfahbod 5be6e5dd57 [gvar] Rewrite linear interpolation 2022-06-27 15:22:16 -06:00
Behdad Esfahbod 57519b532d [gvar] Use pointer-to-member instead of function 2022-06-27 15:18:56 -06:00
Behdad Esfahbod ab15fe082a [gvar] Handle a couple of error conditions 2022-06-27 15:13:10 -06:00
Behdad Esfahbod b7e9e8785c [gvar] Optimize deltas and points loading 2022-06-27 15:09:25 -06:00
Behdad Esfahbod 97cbc2d40a [gvar] Remove condition that font num_coords should match gvar's 2022-06-27 12:37:11 -06:00
Behdad Esfahbod 95bfa0913d [gvar] Optimize translate() 2022-06-27 12:10:16 -06:00
Behdad Esfahbod 9f067582b8 [gvar] Optimize transform() 2022-06-27 12:10:16 -06:00
Behdad Esfahbod cfc57ef862 [glyf] Optimize contour_point_t layout 2022-06-27 12:10:16 -06:00
Behdad Esfahbod 75ca78a6bb [glyf] Optimize hb_contour_points_t::extend 2022-06-27 12:10:16 -06:00
Behdad Esfahbod 30d58bfd0f [glyf] Don't translate/transform components if has no effect 2022-06-26 16:49:40 -06:00
Behdad Esfahbod 9ce9773040 [glyf/SimpleGlyph] Minor use constructor for contour_point_t 2022-06-26 13:08:37 -06:00
Behdad Esfahbod dd71d2c1c3 [gvar] Protect against offset underflow 2022-05-06 13:02:26 -06:00
Behdad Esfahbod 9a6dabd61a [gvar] Remove sanitize check for data array
We are not checking in sanitize that offset array is ascending,
so this check was bogus.
2022-05-06 12:43:45 -06:00
Behdad Esfahbod 38478d1061 [gvar] DEFINE_SIZE_ARRAY instead of DEFINE_SIZE_MIN 2022-05-06 12:43:45 -06:00
Behdad Esfahbod 90d278c92e [gvar] Remove requirement that num_glyphs matches the font's 2022-05-06 12:43:45 -06:00
Behdad Esfahbod ca8a0f3ea3 [gvar] Protect against out-of-range access
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47281
Fixes https://oss-fuzz.com/testcase-detail/5508865908670464
2022-05-06 11:54:38 -06:00
Behdad Esfahbod 3a78cf92c8 [gvar] Fix decoding of private vs shared points
Fixes https://github.com/harfbuzz/harfbuzz/issues/3506
2022-03-25 13:25:28 -06:00
Behdad Esfahbod ac1bb3e39e [machinery] Move accelerators to constructor/destructor 2022-01-20 12:10:05 -07:00