Expose API to clear texture atlas
Using canvases on Electron (and plain Chromium I believe), when resuming from sleep the graphics card may release the texture which results in the terminal display and char atlas being corrupt. This API allows the consumer to clear the texture atlas right after resuming, atlas warm up is not done to simplify this process because the fact that atlases are shared between multiple terminals complicates this. Related microsoft/vscode#69665
This commit is contained in:
@@ -40,4 +40,8 @@ export class WebglAddon implements ITerminalAddon {
|
||||
public get textureAtlas(): HTMLCanvasElement | undefined {
|
||||
return this._renderer?.textureAtlas;
|
||||
}
|
||||
|
||||
public clearTextureAtlas(): void {
|
||||
this._renderer?.clearCharAtlas();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user