From df3ecea773c5f68632e5b4ff0fb5568ce1864272 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 20 Apr 2022 16:06:06 -0600 Subject: [PATCH] [perf/perf] Fix run when ttfparser is not available --- perf/perf-draw.hh | 3 +++ perf/perf-extents.hh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/perf/perf-draw.hh b/perf/perf-draw.hh index 7e577ce1f..d31201e37 100644 --- a/perf/perf-draw.hh +++ b/perf/perf-draw.hh @@ -130,6 +130,9 @@ static void draw (benchmark::State &state, const char *font_path, bool is_var, b hb_blob_destroy (blob); free (tp_font); +#else + state.SkipWithError("ttfparser not available."); + return; #endif } else abort (); diff --git a/perf/perf-extents.hh b/perf/perf-extents.hh index c7bc84c92..c75252637 100644 --- a/perf/perf-extents.hh +++ b/perf/perf-extents.hh @@ -56,6 +56,9 @@ static void extents (benchmark::State &state, const char *font_path, bool is_var hb_blob_destroy (blob); free (tp_font); +#else + state.SkipWithError("ttfparser not available."); + return; #endif }