Skip to content

fix(addon-webgl): request model clear when clearing shared atlas texture#6018

Open
RuanCarvalhoo wants to merge 1 commit into
xtermjs:masterfrom
RuanCarvalhoo:fix/addon-webgl-clearTexture-shared-atlas-model-invalidation-6014
Open

fix(addon-webgl): request model clear when clearing shared atlas texture#6018
RuanCarvalhoo wants to merge 1 commit into
xtermjs:masterfrom
RuanCarvalhoo:fix/addon-webgl-clearTexture-shared-atlas-model-invalidation-6014

Conversation

@RuanCarvalhoo

Copy link
Copy Markdown

Problem

When multiple terminals share the same WebGL texture atlas, calling clearTextureAtlas on one terminal clears the shared atlas pages and glyph caches, but sibling terminals are not notified to rebuild their model.

This leaves stale vertex texture coordinates in unchanged rows on sibling terminals and can render text garbled or blank until a full refresh happens.

Closes #6014

Solution

Set _requestClearModel = true in TextureAtlas.clearTexture after clearing pages/caches.

This aligns clearTexture with other atlas-wide mutation paths that already request a shared model rebuild, so every renderer sharing the atlas performs a full model update on the next frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebGL: clearTextureAtlas() on one Terminal corrupts other Terminals sharing the atlas (clearTexture doesn't request a model clear)

1 participant