mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
test-gpu: 7 subtests covering create/destroy, empty encode, glyph encode, reset, draw funcs singleton, shader sources, and recycle_blob. benchmark-gpu: benchmarks draw, encode, and draw+encode per-glyph across several fonts using google-benchmark. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
58 lines
1.6 KiB
Meson
58 lines
1.6 KiB
Meson
if conf.get('HAVE_GLIB', 0) == 0
|
|
message('You need to have glib support enabled to build perf benchmarks.')
|
|
subdir_done()
|
|
endif
|
|
|
|
google_benchmark = subproject('google-benchmark')
|
|
google_benchmark_dep = google_benchmark.get_variable('google_benchmark_dep')
|
|
|
|
benchmarks = [
|
|
'benchmark-font.cc',
|
|
'benchmark-map.cc',
|
|
'benchmark-ot.cc',
|
|
'benchmark-set.cc',
|
|
'benchmark-shape.cc',
|
|
]
|
|
|
|
foreach source : benchmarks
|
|
benchmark_name = source.split('.')[0]
|
|
benchmark(benchmark_name, executable(benchmark_name, source,
|
|
dependencies: [
|
|
google_benchmark_dep, libharfbuzz_dep
|
|
],
|
|
cpp_args: [],
|
|
include_directories: [incconfig, incsrc],
|
|
install: false,
|
|
), workdir: meson.current_source_dir() / '..', timeout: 100)
|
|
endforeach
|
|
|
|
if not get_option('gpu').disabled()
|
|
benchmark('benchmark-gpu', executable('benchmark-gpu', 'benchmark-gpu.cc',
|
|
dependencies: [
|
|
google_benchmark_dep, libharfbuzz_dep, libharfbuzz_gpu_dep
|
|
],
|
|
cpp_args: [],
|
|
include_directories: [incconfig, incsrc],
|
|
install: false,
|
|
), workdir: meson.current_source_dir() / '..', timeout: 100)
|
|
endif
|
|
|
|
if not get_option('subset').disabled()
|
|
benchmarks_subset = [
|
|
'benchmark-subset.cc',
|
|
]
|
|
|
|
foreach source : benchmarks_subset
|
|
benchmark_name = source.split('.')[0]
|
|
benchmark(benchmark_name, executable(benchmark_name, source,
|
|
dependencies: [
|
|
google_benchmark_dep, libharfbuzz_dep, libharfbuzz_subset_dep
|
|
],
|
|
cpp_args: [],
|
|
include_directories: [incconfig, incsrc],
|
|
install: false,
|
|
), workdir: meson.current_source_dir() / '..', timeout: 100)
|
|
endforeach
|
|
endif
|
|
|