iris: add replaceable glyph atlas buckets

This commit is contained in:
iris committed 2026-09-12 18:10:55 -04:00
1 parent c97df72015
commit 90dffce514
12 files changed
+401 -91

No files matched your search

+5 -1
View File
@@ -18,7 +18,11 @@ Glyph atlas pages are layers of one `texture_2d_array`. `GpuTextures` doubles
the array when it runs out of layers, copies the old layers on the GPU, and
rebuilds every bind group that referenced the old view. Page numbers are
assigned synchronously by `Textures::add_page` because glyph insertion needs
the layer before the renderer processes queued texture updates.
the layer before the renderer processes queued texture updates. Atlas maps and
pages are grouped into named buckets: ordinary font registration uses one
shared default bucket, while callers can isolate fonts they expect to replace.
Replacing a font drops its bucket. The resource slots and array layers from
those pages are reused without compacting or changing any live page number.
Standalone images each own a bind group and are not placed in the glyph
array. Each render layer keeps ordinary rect/glyph instances separately from