Files
harfbuzz/util/gpu
Behdad Esfahbod eb46e5349e [gpu] Wire GL demo to the paint pipeline end-to-end
* hb_gpu_paint_glyph() switches from hb_font_paint_glyph_or_fail
  to hb_font_paint_glyph so non-color glyphs also produce a blob
  (harfbuzz synthesizes push_clip_glyph + color(is_foreground) +
  pop_clip which our callbacks turn into a single LAYER_SOLID
  op).  Return value is now "no internal error" rather than
  "glyph had color paint".

* util/gpu/demo-font.cc: drops the draw-only upload path and
  routes every glyph through hb_gpu_paint_{clear,glyph,encode,
  recycle_blob}.  Uploads the active palette to the
  hb_gpu_palette uniform array in demo_font_create.

* util/gpu/demo-shader.cc: concatenates hb_gpu_paint_shader_source
  after the shared + draw sources, and the demo's fragment main
  now calls hb_gpu_paint(texcoord, glyphLoc, u_foreground)
  directly.  Stem-darkening / debug overlay paths preserved
  against the premultiplied alpha channel returned by paint.

MSL / WGSL / HLSL demo paths are unchanged for now -- the paint
shader is GLSL-only and those demos keep using the draw path.

wasm size impact (local Emscripten build):
  baseline                     412722   170342 gz
  +HB_NO_COLOR/HB_NO_PAINT     437752   179165 gz
  +demo paint wiring           443313   181502 gz
  delta (vs baseline)          +30591    +11160

All 241 tests pass.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 14:36:32 -06:00
..
2026-03-26 18:30:13 -06:00
2026-03-30 16:40:29 -06:00