[Glyph] Minor micro-optimize away a function call

For when coords are not set.
This commit is contained in:
Behdad Esfahbod 2023-06-29 12:38:45 -06:00
parent 5fb7b02ac1
commit c49ca37115
2 changed files with 5 additions and 6 deletions

View file

@ -371,10 +371,11 @@ struct Glyph
}
#ifndef HB_NO_VAR
glyf_accelerator.gvar->apply_deltas_to_points (gid,
coords,
points.as_array ().sub_array (old_length),
phantom_only);
if (coords)
glyf_accelerator.gvar->apply_deltas_to_points (gid,
coords,
points.as_array ().sub_array (old_length),
phantom_only);
#endif
// mainly used by CompositeGlyph calculating new X/Y offset value so no need to extend it

View file

@ -294,8 +294,6 @@ struct gvar
const hb_array_t<contour_point_t> points,
bool phantom_only = false) const
{
if (!coords) return true;
if (unlikely (glyph >= glyphCount)) return true;
hb_bytes_t var_data_bytes = table->get_glyph_var_data_bytes (table.get_blob (), glyphCount, glyph);