Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle general canvas context loss #2816

Open
Tyriar opened this issue Apr 6, 2020 · 4 comments
Open

Handle general canvas context loss #2816

Tyriar opened this issue Apr 6, 2020 · 4 comments
Labels

Comments

@Tyriar
Copy link
Member

Tyriar commented Apr 6, 2020

Contexts can become lost when graphics card drivers are reinstalled for example. This should be handled generically.

VS Code issue: microsoft/vscode#94513

Related: #2253

@Tyriar
Copy link
Member Author

Tyriar commented Oct 11, 2021

I believe this is handled now for webgl with #3276

@jerch
Copy link
Member

jerch commented Oct 11, 2021

@Tyriar Is that issue also behind those funky outputs after a machine wakeup from sleep mode for the canvas renderer? If so, is there a way to detect it programmatically like webglcontextlost for webgl? Because then we would need to invalidate all those shiny _ctx flying around in our renderer code and "reboot" them (prolly including the caches).

@Tyriar
Copy link
Member Author

Tyriar commented Oct 11, 2021

@jerch we can't detect that happening on the web, the GPU's texture gets corrupted but AFAICT there's no way for us to listen for it. The fix there in VS Code was to listen via electron to OS resume and clear all texture atlases using the webgl API and the new xterm core API for clearing the canvas texture atlas.

@jerch
Copy link
Member

jerch commented Oct 11, 2021

Hmm ic, well its a pity but not much we can do about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants