TextureAtlas.beginFrame() returned a consume-once boolean, so after a page
merge only the FIRST renderer to draw rebuilt its vertex model. Terminals
sharing the atlas via CharAtlasCache kept stale texture-page indexes/coords
and drew garbled glyphs on their next partial render (vscode#322756).
Replace the flag with a monotonic TextureAtlas.pagesVersion, bumped on page
merges and overflow-page creation. Each GlyphRenderer tracks its own
last-seen value in beginFrame(), so every terminal sharing the atlas rebuilds
its model independently. setAtlas() resets the tracker to force a rebuild
when the atlas instance changes.
WebglSharedAtlasGarble now passes (was diff ~130/255 vs tolerance 14); full
webgl addon suite 74/74 green.
Correct "transferred", remove duplicate "is", and use "one-off"
instead of "once of" in developer-facing comments.
Co-authored-by: Cursor <cursoragent@cursor.com>
The merging-pages index sort used (a, b) => a > b ? 1 : -1, which
returns -1 when a === b and violates the comparator contract. Use
(a, b) => a - b for ascending numeric order.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace direct console.log/warn/error calls in the WebGL addon with
ILogService so messages respect the terminal logLevel and custom logger.
Fixesxtermjs/xterm.js#5921
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Dispose _onRemoveTextureAtlasCanvas in TextureAtlas.dispose() alongside
_onAddTextureAtlasCanvas to avoid leaking listeners when the atlas is torn down.
Fixes#5917
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Draw calls can now be scaled by the char bounding box instead of the
cell bounding box. This means these character won't be stretched. Both
can also be used at the same like as is the case with 1FBBC RIGHT OPEN
SQUARED DOT.
Fixes#5488