Commit Graph
174 Commits
Author SHA1 Message Date
Behdad EsfahbodandClaude Opus 4.6 066da3ed3d [gpu] Multi-script default text based on font GSUB
Check the font's GSUB table for Latin and Arabic script support.
Build default demo text from English (Lorem Ipsum) and Persian
paragraphs for supported scripts, cropped to 35 lines each.

Source paragraphs live in perf/texts/{en,fa}-paragraph.txt.
gen-default-texts.py wraps them at fixed width and generates
the .hh headers.

Web demo hardcodes both texts since the embedded font supports
both scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 12:23:43 -06:00
Behdad EsfahbodandClaude Opus 4.6 686f3caa86 [gpu] Implement blob recycling in encode
recycle_blob stores the blob; encode reuses both the blob object
and its data buffer when the buffer is >= needed and < 2x needed.
Otherwise malloc fresh and replace_buffer on the recycled blob.

hb_blob_t::replace_buffer now skips destroy_user_data when the
new data pointer is the same as the old one (same-buffer reuse).

Add explicit destructor to hb_gpu_draw_t for recycled_blob cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:13:44 -06:00
Behdad EsfahbodandClaude Opus 4.6 971e607319 [gpu] Add API test and google-benchmark encode benchmark
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>
2026-03-26 22:27:40 -06:00
Khaled Hosny b91d4b8d75 Add meson options to disable building harfbuzz-subset 2026-03-04 18:12:45 +02:00
Behdad EsfahbodandClaude Opus 4.6 3bed6db1d9 Move hb-draw-all, hb-paint-all, hb-raster-all to util/ as uninstalled binaries
Move perf tools from perf/ and test/raster/ to util/ alongside the
other uninstalled utilities.  Remove the now-empty test/raster/ directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-21 17:29:05 -03:00
Behdad Esfahbod 32a8fd62e8 Move hb-draw-compare and hb-svg-compare to test/draw 2026-02-12 15:26:19 -07:00
Behdad Esfahbod 07afd2ccff [hb-svg-compare] Write out error with %g, not %.5f 2026-02-06 22:29:12 -07:00
Behdad Esfahbod f0ea86526d [hb-draw-compare] Print out debug info from hb-view 2026-02-06 11:47:36 -07:00
Behdad Esfahbod a603a37294 [benchmark-shape] Fix unused-var under NDEBUG 2026-01-12 13:09:51 -07:00
Behdad Esfahbod 93fb777502 [perf/benchmark-shape] Add Duployan test
Reshuffle tests to run from fastest to slowest.
2026-01-03 17:27:50 -07:00
Khaled Hosny e9c35e7352 [perf/benchmark-shape] Add Gulzar (#5698) 2026-01-02 11:30:30 -07:00
Behdad Esfahbod f488743916 [hb-draw-compare] Fix help string 2025-12-27 12:27:49 -07:00
Behdad Esfahbod 3aa1868b23 [benchmark-font] Accept empty --variations 2025-11-20 13:37:58 -07:00
Behdad Esfahbod 5087e53be9 [perf] Use GOption (#5422)
* [perf] Don't build benchmarks if no glib

Also remove unnecessary deps.

* [benchmark-shape/font] Port to GOption
2025-07-26 04:02:41 -06:00
Behdad Esfahbod ff46559b67 [benchmark-shape] Massage message again 2025-07-24 00:34:37 -06:00
Behdad Esfahbod 5991cb3d03 [benchmark-shape] Change message 2025-07-24 00:30:06 -06:00
Behdad Esfahbod 0a7a760ae1 [benchmark-shape] Skip shaper if shaping failed 2025-07-24 00:28:51 -06:00
Behdad Esfahbod 0c3606b513 [benchmark-font] Respect HB_BENCHMARK_TEXT 2025-07-23 17:06:50 -06:00
Behdad Esfahbod fa082b258f [benchmark-shape] Warm up the font / buffer first 2025-07-23 15:18:13 -06:00
Behdad Esfahbod b3765e7c40 [benchmark-font] Call the plural glyph-v-origins API
Ouch!
2025-07-20 07:19:23 -06:00
Behdad Esfahbod cbc928fa79 [benchmark-font] malloc hygiene 2025-07-20 07:19:23 -06:00
Behdad Esfahbod dd85aeba88 [benchmark-shape] Take text direction as extra argument 2025-07-20 07:18:54 -06:00
Behdad Esfahbod 266c0f8e3e [benchmark-font] Add --max-glyphs argument
--max-glyphs 256 can be used to measure the cached behavior
of many ops, like glyph_h_advance, glyph_v_advance,
and glyph_v_origin.
2025-07-20 00:12:26 -06:00
Behdad Esfahbod 94efb343cb [benchmark-font] Benchmark v_advances and v_origin 2025-07-20 00:12:20 -06:00
Behdad Esfahbod 971036888f [perf/hb-draw-compare] Default font-funcs2 to fontations
Yay!
2025-07-11 00:55:05 -06:00
Behdad Esfahbod 8d517f7e43 [hb-draw-compare] Declutter output 2025-06-12 08:13:42 -06:00
Behdad Esfahbod d9a258bedc [perf] Add hb-draw-compare and hb-svg-compare 2025-06-08 13:43:27 +03:00
Behdad Esfahbod 88b9feb917 [benchmark-font] Allow specifying variations on cmdline 2025-05-20 20:40:40 -06:00
Behdad Esfahbod 60c4b9cb61 [benchmark-font] Minor refactor
In prep for accepting arbitrary variations on the cmdline.
2025-05-20 20:36:39 -06:00
Behdad Esfahbod 9ddf3da71e [benchmark-shape] Accept one variation on the cmd-line 2025-04-04 16:04:07 -06:00
Behdad Esfahbod 0eeb6ccb42 [perf] Bikeshedding 2025-03-21 17:36:43 -06:00
Behdad Esfahbod 6b9d9f7259 [face] Add HB_FACE_LOADER env var 2025-03-09 01:41:49 -07:00
Behdad Esfahbod 2a878b1b76 [font-funcs] Add two new API
+ hb_font_set_funcs_using()
+ hb_font_list_funcs()

Part of https://github.com/harfbuzz/harfbuzz/issues/5117
2025-03-08 11:50:53 -07:00
Behdad Esfahbod e27e7f1c7d [perf] README minor 2025-03-07 14:01:57 -07:00
Behdad Esfahbod 460a8225ba [perf] Improve README 2025-03-07 13:33:08 -07:00
Behdad Esfahbod e054db4ae2 [fontations] Hook up to benchmark-font 2025-03-06 04:23:24 +02:00
Behdad Esfahbod a2ea5d28cb [benchmark-font] Report draw times in ms, not us 2025-02-18 21:43:39 -07:00
Behdad Esfahbod 19a152b47e [perf] Don't depend on libharfbuzz-subset for most benchmarks 2025-02-09 12:37:28 +00:00
Behdad Esfahbod b44f6ff5fe [perf/texts] Add a list of just 2letter strings 2025-02-05 12:19:48 +00:00
Behdad Esfahbod 267ebeeccd [perf/text] Add a long piece of JS code for benchmarking 2025-02-04 11:10:31 +00:00
Behdad Esfahbod d8d0987feb [benchmark-shape] Remove variable-font test set
It doesn't really affect shaping much. Kill it.
2025-02-02 18:08:09 +00:00
Behdad Esfahbod 9bd75952e5 [benchmark-shape] Compare diff shapers, not font funcs 2025-02-02 11:14:49 +00:00
Garret Rieger 392581be01 [subest] get benchmark subset working again. 2024-10-24 15:42:31 -06:00
Behdad Esfahbod 825bc19643 [perf] Simplify meson.build
Fixes https://github.com/harfbuzz/harfbuzz/issues/4896
2024-10-16 01:56:17 -06:00
Behdad Esfahbod a8360b7e95 [perf] Respect new envvar HB_FACE_LOADER 2024-10-15 14:58:13 -06:00
Behdad Esfahbod c224178a09 [perf] Add hb-benchmark.hh 2024-10-15 14:58:13 -06:00
Behdad Esfahbod 8a805271a1 [coretext] Start implementing CoreText font-funcs
Does nominal glyph mapping, horiz advances, and draw so far.
2024-10-13 13:04:29 -06:00
Khaled Hosny cf1fdf1632 Drop autotools build
Fixes https://github.com/harfbuzz/harfbuzz/issues/4720
2024-06-27 15:28:38 +03:00
Garret Rieger 4cf606f674 [instancer] Promote partial instancing api out of experimental. 2024-05-02 21:22:18 +00:00
Garret Rieger 2fcace77b2 [subet] Don't use experimental api flag in benchmark if not compiled with experimental api. 2024-04-02 11:55:44 -06:00