[perf/benchmark-font] Fix build without freetype
This commit is contained in:
parent
58a0988b57
commit
3aa2ff7988
|
@ -1,8 +1,15 @@
|
||||||
#include "benchmark/benchmark.h"
|
#include "benchmark/benchmark.h"
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "hb.h"
|
#include "hb.h"
|
||||||
#include "hb-ot.h"
|
#include "hb-ot.h"
|
||||||
|
#ifdef HAVE_FREETYPE
|
||||||
#include "hb-ft.h"
|
#include "hb-ft.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define SUBSET_FONT_BASE_PATH "test/subset/data/fonts/"
|
#define SUBSET_FONT_BASE_PATH "test/subset/data/fonts/"
|
||||||
|
@ -88,7 +95,9 @@ static void BM_Font (benchmark::State &state,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FREETYPE:
|
case FREETYPE:
|
||||||
|
#ifdef HAVE_FREETYPE
|
||||||
hb_ft_font_set_funcs (font);
|
hb_ft_font_set_funcs (font);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +169,9 @@ static void test_operation (operation_t op,
|
||||||
for (auto& test_input : tests)
|
for (auto& test_input : tests)
|
||||||
{
|
{
|
||||||
test_backend (HARFBUZZ, "hb", op, op_name, time_unit, test_input);
|
test_backend (HARFBUZZ, "hb", op, op_name, time_unit, test_input);
|
||||||
|
#ifdef HAVE_FREETYPE
|
||||||
test_backend (FREETYPE, "ft", op, op_name, time_unit, test_input);
|
test_backend (FREETYPE, "ft", op, op_name, time_unit, test_input);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue