From 71a0cda869f55c00727fdbbf079b671f7fe374ff Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 16 May 2022 17:43:48 -0600 Subject: [PATCH] [perf/benchmark-font] Only certain fonts are variable Don't test every font as variable. --- perf/benchmark-font.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/perf/benchmark-font.cc b/perf/benchmark-font.cc index 0e1b345f0..57b700b0d 100644 --- a/perf/benchmark-font.cc +++ b/perf/benchmark-font.cc @@ -16,16 +16,17 @@ struct test_input_t { + bool is_variable; const char *font_path; } tests[] = { - {SUBSET_FONT_BASE_PATH "Roboto-Regular.ttf"}, - {SUBSET_FONT_BASE_PATH "SourceSansPro-Regular.otf"}, - {SUBSET_FONT_BASE_PATH "AdobeVFPrototype.otf"}, - {SUBSET_FONT_BASE_PATH "SourceSerifVariable-Roman.ttf"}, - {SUBSET_FONT_BASE_PATH "Comfortaa-Regular-new.ttf"}, - {SUBSET_FONT_BASE_PATH "NotoNastaliqUrdu-Regular.ttf"}, - {SUBSET_FONT_BASE_PATH "NotoSerifMyanmar-Regular.otf"}, + {false, SUBSET_FONT_BASE_PATH "Roboto-Regular.ttf"}, + {false, SUBSET_FONT_BASE_PATH "SourceSansPro-Regular.otf"}, + {true , SUBSET_FONT_BASE_PATH "AdobeVFPrototype.otf"}, + {true , SUBSET_FONT_BASE_PATH "SourceSerifVariable-Roman.ttf"}, + {false, SUBSET_FONT_BASE_PATH "Comfortaa-Regular-new.ttf"}, + {false, SUBSET_FONT_BASE_PATH "NotoNastaliqUrdu-Regular.ttf"}, + {false, SUBSET_FONT_BASE_PATH "NotoSerifMyanmar-Regular.otf"}, }; @@ -194,7 +195,7 @@ static void test_operation (operation_t op, { for (auto& test_input : tests) { - for (int variable = 0; variable < 2; variable++) + for (int variable = 0; variable < int (test_input.is_variable) + 1; variable++) { bool is_var = (bool) variable;