mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
Store budget policy and live state on vector draw and paint contexts. Path sinks borrow the owning context's live counter, making glyph traversal, serialized path commands, and sweep-gradient patches consume one aggregate budget throughout a clear-to-render session. Recharge the configured policy on clear, restore the finite default on reset, and expose the generic draw and paint budget callbacks for SVG and PDF contexts. Add lifecycle and traversal-depletion coverage for both formats. Tests: meson test -C build (273/273 passed) Assisted-by: OpenAI Codex <codex@openai.com>
30 lines
615 B
Meson
30 lines
615 B
Meson
run_test = find_program('run-tests.py')
|
|
|
|
test_vector_budget = executable('test-vector-budget', 'test-vector-budget.c',
|
|
dependencies: [libharfbuzz_vector_dep],
|
|
)
|
|
|
|
test('budget', test_vector_budget,
|
|
args: [meson.project_source_root() / 'test' / 'api' / 'fonts' / 'glyphs.ttf'],
|
|
suite: 'vector',
|
|
)
|
|
|
|
tests = [
|
|
'basic',
|
|
'varc',
|
|
]
|
|
|
|
foreach t : tests
|
|
fname = '@0@.tests'.format(t)
|
|
|
|
test(t, run_test,
|
|
args: [
|
|
hb_vector,
|
|
meson.current_source_dir() / 'data' / 'tests' / fname,
|
|
],
|
|
workdir: meson.current_build_dir() / '..' / '..',
|
|
protocol: 'tap',
|
|
suite: 'vector',
|
|
)
|
|
endforeach
|