Files
harfbuzz/util/gpu
Behdad Esfahbod 9aec34108b [gpu] Fix Metal segfault: route palette upload through atlas backend
The Metal path creates a GLFW window with GLFW_NO_API (no GL
context), but demo_font_upload_palette() unconditionally called
glGetIntegerv(), causing a segfault on the first glyph lookup.

Split palette upload into GL and external-backend paths:

- Extract demo_font_get_palette() to read CPAL colors into a
  float array, shared by both paths.
- GL path (demo_font_upload_palette_gl) uploads via glUniform4fv
  as before.
- External-backend path uploads via a new upload_palette callback
  in demo_atlas_backend_t.
- Metal renderer implements the callback, writing palette data
  directly to its paletteBuffer.

This fixes the --metal crash and enables proper COLRv0 palette
color rendering on Metal.

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