Files
harfbuzz/docs
Behdad Esfahbod e66500fd8e [gpu] hb_gpu_paint: bake resolved color into blob, drop palette binding
Add a raster-style configuration surface to hb_gpu_paint_t:

  hb_gpu_paint_set_foreground / hb_gpu_paint_get_foreground
  hb_gpu_paint_set_palette    / hb_gpu_paint_get_palette
  hb_gpu_paint_clear_custom_palette_colors
  hb_gpu_paint_set_custom_palette_color

hb_gpu_paint_glyph now passes paint->palette and paint->foreground
through to hb_font_paint_glyph, and the custom-palette-color
callback consults the user's overrides map (same pattern as
hb_raster_paint_t) before letting harfbuzz fall back to the font's
own palette.

With that in place, the color() callback can bake the already-
resolved RGBA into the encoded op directly, quantized as signed
Q15 in the existing second texel, instead of recording a palette
index and trusting the shader to look it up.  The is_foreground
flag stays in the op so a runtime foreground-color change (e.g.
dark-mode toggle) still works without re-encoding.

Shader side: drop the hb_gpu_palette uniform/storage binding and
its HB_GPU_PALETTE_SIZE knob from all four paint-fragment shaders
(GLSL / MSL / WGSL / HLSL); read the per-layer color straight out
of the blob texel.  This removes a per-backend binding slot and
the 256-entry uniform-array size ceiling that blocked fonts like
Noto-COLRv1 (~6200 entries).

Trade-off: changing the palette selection or overrides invalidates
previously encoded blobs and requires re-encoding.  In practice
palette switches are rare, and the rendering hot path gets
simpler.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:44:58 -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