[perf/benchmark-font] Only certain fonts are variable

Don't test every font as variable.
This commit is contained in:
Behdad Esfahbod 2022-05-16 17:43:48 -06:00
parent fb413f5202
commit 71a0cda869
1 changed files with 9 additions and 8 deletions

View File

@ -16,16 +16,17 @@
struct test_input_t struct test_input_t
{ {
bool is_variable;
const char *font_path; const char *font_path;
} tests[] = } tests[] =
{ {
{SUBSET_FONT_BASE_PATH "Roboto-Regular.ttf"}, {false, SUBSET_FONT_BASE_PATH "Roboto-Regular.ttf"},
{SUBSET_FONT_BASE_PATH "SourceSansPro-Regular.otf"}, {false, SUBSET_FONT_BASE_PATH "SourceSansPro-Regular.otf"},
{SUBSET_FONT_BASE_PATH "AdobeVFPrototype.otf"}, {true , SUBSET_FONT_BASE_PATH "AdobeVFPrototype.otf"},
{SUBSET_FONT_BASE_PATH "SourceSerifVariable-Roman.ttf"}, {true , SUBSET_FONT_BASE_PATH "SourceSerifVariable-Roman.ttf"},
{SUBSET_FONT_BASE_PATH "Comfortaa-Regular-new.ttf"}, {false, SUBSET_FONT_BASE_PATH "Comfortaa-Regular-new.ttf"},
{SUBSET_FONT_BASE_PATH "NotoNastaliqUrdu-Regular.ttf"}, {false, SUBSET_FONT_BASE_PATH "NotoNastaliqUrdu-Regular.ttf"},
{SUBSET_FONT_BASE_PATH "NotoSerifMyanmar-Regular.otf"}, {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 (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; bool is_var = (bool) variable;