From c31471d10e14ca66a1b668905fac2ab40941ea41 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 28 Jun 2023 13:51:54 -0600 Subject: [PATCH] [glyf] Micro-optimize --- src/OT/glyf/glyf.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/OT/glyf/glyf.hh b/src/OT/glyf/glyf.hh index e1132dfe0..63207c8d6 100644 --- a/src/OT/glyf/glyf.hh +++ b/src/OT/glyf/glyf.hh @@ -225,7 +225,7 @@ struct glyf_accelerator_t assert (count >= glyf_impl::PHANTOM_COUNT); count -= glyf_impl::PHANTOM_COUNT; for (unsigned point_index = 0; point_index < count; point_index++) - consumer.consume_point (all_points[point_index]); + consumer.consume_point (all_points.arrayZ[point_index]); consumer.points_end (); } @@ -296,6 +296,7 @@ struct glyf_accelerator_t if (extents) bounds = contour_bounds_t (); } + __attribute__((always_inline)) void consume_point (const contour_point_t &point) { bounds.add (point); } void points_end () { bounds.get_extents (font, extents, scaled); }