Files
harfbuzz/docs
Behdad Esfahbod 7b5fc7f0c4 [gpu] Add hb_gpu_paint_* glyph/encode/clear/reset/recycle stubs
Reserve the paint-encoder API shape and wire the demo to try the
paint path before falling back to draw.  The encoder itself is
still a stub so the fallback always fires today; when the encoder
lands, color glyphs will flip automatically with no demo changes.

New public API:

  hb_gpu_paint_glyph (paint, font, glyph)
    Stashes the font scale on @paint and calls
    hb_font_paint_glyph_or_fail() with hb_paint_funcs_get_empty()
    so non-color glyphs report false.  Returns the funcs call
    result.

  hb_gpu_paint_encode (paint, &extents)
    Stub, returns NULL.

  hb_gpu_paint_clear (paint)
  hb_gpu_paint_reset (paint)
  hb_gpu_paint_recycle_blob (paint, blob)
    Stubs that preserve the right semantics.  clear is a no-op
    (no accumulator state yet), reset additionally zeroes the
    stashed scale, recycle_blob hb_blob_destroys.

Adds x_scale / y_scale to hb_gpu_paint_t so glyph can stash them
for the encoder to consume later.

util/gpu/demo-font.cc:
  - Creates a paired hb_gpu_paint_t alongside hb_gpu_draw_t.
  - Per glyph: if the face has COLRv1 paint for the glyph, tries
    hb_gpu_paint_glyph + hb_gpu_paint_encode.  On NULL blob, falls
    through to the existing draw path.
  - Changes the per-iteration sync from _reset to _clear for both
    draw and paint: _reset zeroes the font-scale config that
    _glyph immediately re-populates, which wastes work and is
    semantically wrong.  _clear discards accumulator state while
    preserving user config.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 13:38:14 -06:00
..
2026-04-04 20:31:18 +02:00
2026-03-31 11:31:42 -06:00
2026-03-31 11:31:42 -06:00
2024-06-28 22:54:09 -06:00
2021-09-06 17:25:41 +02:00
2024-07-11 14:39:38 +03:00