[benchmark-font] Call the plural glyph-v-origins API

Ouch!
This commit is contained in:
Behdad Esfahbod committed 2025-07-20 07:19:23 -06:00
1 parent abcefb695a
commit b3765e7c40
1 file changed
+8 -7
+8 -7
View File
@@ -33,7 +33,7 @@ enum operation_t
nominal_glyphs,
glyph_h_advances,
glyph_v_advances,
glyph_v_origin,
glyph_v_origins,
glyph_extents,
draw_glyph,
paint_glyph,
@@ -183,7 +183,7 @@ static void BM_Font (benchmark::State &state,
free (glyphs);
break;
}
case glyph_v_origin:
case glyph_v_origins:
{
hb_codepoint_t *glyphs = (hb_codepoint_t *) calloc (num_glyphs, sizeof (hb_codepoint_t));
hb_position_t *origins_x = (hb_position_t *) calloc (num_glyphs, sizeof (hb_codepoint_t));
@@ -193,10 +193,11 @@ static void BM_Font (benchmark::State &state,
glyphs[g] = g;
for (auto _ : state)
for (unsigned g = 0; g < num_glyphs; g++)
hb_font_get_glyph_v_origin (font,
glyphs[g],
&origins_x[g], &origins_y[g]);
hb_font_get_glyph_v_origins (font,
num_glyphs,
glyphs, sizeof (*glyphs),
origins_x, sizeof (*origins_x),
origins_y, sizeof (*origins_y));
free (origins_y);
free (origins_x);
@@ -339,7 +340,7 @@ int main(int argc, char** argv)
TEST_OPERATION (nominal_glyphs, benchmark::kMicrosecond);
TEST_OPERATION (glyph_h_advances, benchmark::kMicrosecond);
TEST_OPERATION (glyph_v_advances, benchmark::kMicrosecond);
TEST_OPERATION (glyph_v_origin, benchmark::kMicrosecond);
TEST_OPERATION (glyph_v_origins, benchmark::kMicrosecond);
TEST_OPERATION (glyph_extents, benchmark::kMicrosecond);
TEST_OPERATION (draw_glyph, benchmark::kMillisecond);
TEST_OPERATION (paint_glyph, benchmark::kMillisecond);