Don't let distance field glyphs cross texture boundaries


The glyph cache uses a single area allocator spanning all its
textures stacked vertically, each the size of the maximum texture
size. Since the allocator had no knowledge of the texture
boundaries, a glyph could be allocated across the boundary between
two textures. It would then be assigned to the upper texture, which
would grow beyond the maximum texture size, causing texture creation
to fail.

This adds an optional slice height to QSGAreaAllocator. When set, a
free node which spans a slice boundary is split at the boundary
before allocating, so that allocations always end up within a
single slice. The glyph cache uses the maximum texture size as slice
height, so glyphs which do not fit at the bottom of one texture are
moved to the next one.

Task-number: QTBUG-151612
Pick-to: 6.8 6.12
Change-Id: I17a2067b392652f60dd6455f8c11f28be4a16635
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commitb887a376505ff1eb4a616ba600a863450151939a
parent873c14f8421560a4e353c12637b88045b211b536
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
commit timeThu, 22 Oct 2026 10:03:32 +0000