Skip to content

Ensure the glyph vertices are cleared when switching buffers#3624

Merged
Tyriar merged 3 commits intoxtermjs:masterfrom
Tyriar:3617_clear_on_buffer_change
Feb 3, 2022
Merged

Ensure the glyph vertices are cleared when switching buffers#3624
Tyriar merged 3 commits intoxtermjs:masterfrom
Tyriar:3617_clear_on_buffer_change

Conversation

@Tyriar
Copy link
Copy Markdown
Member

@Tyriar Tyriar commented Feb 3, 2022

It's still not totally clear why this happens but inspecting the code I'm guessing there was just always a bug here that artifacts could be left around when the buffer changes. The fix is fairly safe, we just force clear the glyph's arrays that are sent to the GPU when the buffer changes.

I also made it so this happens whenever WebglRenderer.clear() is called via:

    this._model.clear();
    this._glyphRenderer.clear(true);

Previously it was only clearing the render layers which seems wrong. AFAICT this now is only called on when a font related setting changes or the active buffer changes so it shouldn't cause a performance regression.

Fixes #3617
Part of microsoft/vscode#142091

@Tyriar Tyriar added this to the 4.18.0 milestone Feb 3, 2022
@Tyriar Tyriar self-assigned this Feb 3, 2022
@Tyriar Tyriar enabled auto-merge February 3, 2022 16:43
@Tyriar Tyriar merged commit a63890e into xtermjs:master Feb 3, 2022
@Tyriar Tyriar deleted the 3617_clear_on_buffer_change branch February 3, 2022 16:58
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.

Window contents not cleared properly

1 participant