SIGN IN SIGN UP

draw_text: adopt outer many_instances batch on linux/windows (#1049)

CodeEditor opens an outer raster batch via DrawText::begin_many_instances
before its glyph loop. The linux/windows branch of DrawText::draw_text
ignored self.many_instances and opened its own nested batch, which
resolved (via find_appendable_drawcall) to the same draw_item whose
`instances` Vec was already swapped out by the outer open, panicking on
unwrap in Cx2d::begin_many_instances.

Mirror what the other platform branch (and draw_rasterized_glyphs_abs)
already do: take self.many_instances on entry, track whether the active
raster batch is the outer one, and hand it back on exit so the caller's
end_many_instances finalizes it. Skip the !drew_raster_this_frame area
clear when the outer batch is still live.
K
Kevin Boos committed
4a576a7add4b717152bd6372cf6691ee05190981
Parent: 85fbea9
Committed by GitHub <noreply@github.com> on 4/17/2026, 6:25:28 AM