Change:
Part of We should also improve the fallback logic to do this: Try webgl If it threw an exception, try canvas If frame rendering averages 50ms (existing detection), use DOM We will keep the canvas renderer around for now mainly because Safari doesn't support webgl2 and can evaluate again at a later date.
It looks like canvas is still the default for me -- the is present unless I explicitly enable experimentalWebgl. I don't see any notifications of errors that could be causing it.

Discussion:
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility'; import { ITerminalInstanceService, ITerminalInstance, ITerminalExternalLinkProvider } from 'vs/workbench/contrib/terminal/browser/terminal'; import { TerminalProcessManager } from 'vs/workbench/contrib/terminal/browser/terminalProcessManager'; <del> import type { Terminal as XTermTerminal, IBuffer, ITerminalAddon } from 'xterm'; </del> <ins> import type { Terminal as XTermTerminal, IBuffer, ITerminalAddon, RendererType } from 'xterm'; </ins> import type { SearchAddon, ISearchOptions } from 'xterm-addon-search'; import type { Unicode11Addon } from 'xterm-addon-unicode11'; import type { WebglAddon } from 'xterm-addon-webgl';

const font = this._configHelper.getFont(undefined, true); const config = this._configHelper.config; const editorOptions = this._configurationService.getValue<IEditorOptions>('editor'); <ins> let xtermRendererType: RendererType; if (config.rendererType === 'auto') { // Set the builtin renderer to canvas, even when webgl is being used since it's an addon const suggestedRendererType = this._storageService.get(SUGGESTED_RENDERER_TYPE, StorageScope.GLOBAL); xtermRendererType = suggestedRendererType === 'dom' ? 'dom' : 'canvas'; } else { xtermRendererType = config.rendererType === 'experimentalWebgl' ? 'canvas' : config.rendererType; } </ins> const xterm = new Terminal({ altClickMovesCursor: config.altClickMovesCursor && editorOptions.multiCursorModifier === 'alt',

fastScrollModifier: 'alt', fastScrollSensitivity: editorOptions.fastScrollSensitivity, scrollSensitivity: editorOptions.mouseWheelScrollSensitivity, <del> rendererType: (config.rendererType === 'auto' || config.rendererType === 'experimentalWebgl') ? 'canvas' : config.rendererType, </del> <ins> rendererType: xtermRendererType, </ins> wordSeparator: config.wordSeparators }); this._xterm = xterm;

this._wrapperElement.appendChild(this._xtermElement); this._container.appendChild(this._wrapperElement); xterm.open(this._xtermElement); <del> if (this._configHelper.config.rendererType === 'experimentalWebgl') { </del> <ins> const suggestedRendererType = this._storageService.get(SUGGESTED_RENDERER_TYPE, StorageScope.GLOBAL); if (this._configHelper.config.rendererType === 'auto' && (suggestedRendererType === 'auto' || suggestedRendererType === undefined) || this._configHelper.config.rendererType === 'experimentalWebgl') { </ins> this._enableWebglRenderer(); }

const frameTimes: number[] = []; const textRenderLayer = this._xtermCore!._renderService._renderer._renderLayers[0]; const originalOnGridChanged = textRenderLayer.onGridChanged; const evaluateCanvasRenderer = () => { // Discard first frame time as it's normal to take longer frameTimes.shift(); const medianTime = frameTimes.sort((a, b) => a - b)[Math.floor(frameTimes.length / 2)]; if (medianTime > SLOW_CANVAS_RENDER_THRESHOLD) { <del> const promptChoices: IPromptChoice[] = [ { label: nls.localize('yes', "Yes"), run: () => this._configurationService.updateValue('terminal.integrated.rendererType', 'dom', ConfigurationTarget.USER) } as IPromptChoice, { label: nls.localize('no', "No"), run: () => { } } as IPromptChoice, { label: nls.localize('dontShowAgain', "Don't Show Again"), isSecondary: true, run: () => this._storageService.store(NEVER_MEASURE_RENDER_TIME_STORAGE_KEY, true, StorageScope.GLOBAL, StorageTarget.MACHINE) } as IPromptChoice ]; this._notificationService.prompt( Severity.Warning, nls.localize('terminal.slowRendering', 'The standard renderer for the integrated terminal appears to be slow on your computer. Would you like to switch to the alternative DOM-based renderer which may improve performance? [Read more about terminal settings](https://code.visualstudio.com/docs/editor/integrated-terminal#_changing-how-the-terminal-is-rendered).'), promptChoices ); </del> <ins> if (this._configHelper.config.rendererType === 'auto') { this._storageService.store(SUGGESTED_RENDERER_TYPE, 'dom', StorageScope.GLOBAL, StorageTarget.MACHINE); this.updateConfig(); } else { const promptChoices: IPromptChoice[] = [ { label: nls.localize('yes', "Yes"), run: () => this._configurationService.updateValue('terminal.integrated.rendererType', 'dom', ConfigurationTarget.USER) } as IPromptChoice, { label: nls.localize('no', "No"), run: () => { } } as IPromptChoice, { label: nls.localize('dontShowAgain', "Don't Show Again"), isSecondary: true, run: () => this._storageService.store(NEVER_MEASURE_RENDER_TIME_STORAGE_KEY, true, StorageScope.GLOBAL, StorageTarget.MACHINE) } as IPromptChoice ]; this._notificationService.prompt( Severity.Warning, nls.localize('terminal.slowRendering', 'The standard renderer for the integrated terminal appears to be slow on your computer. Would you like to switch to the alternative DOM-based renderer which may improve performance? [Read more about terminal settings](https://code.visualstudio.com/docs/editor/integrated-terminal#_changing-how-the-terminal-is-rendered).'), promptChoices ); } </ins> } };

this._safeSetOption('rightClickSelectsWord', config.rightClickBehavior === 'selectWord'); this._safeSetOption('wordSeparator', config.wordSeparators); const suggestedRendererType = this._storageService.get(SUGGESTED_RENDERER_TYPE, StorageScope.GLOBAL); <del> if ((suggestedRendererType === 'auto' && config.rendererType === 'auto') || config.rendererType === 'experimentalWebgl') { </del> <ins> if ((config.rendererType === 'auto' && suggestedRendererType === undefined) || config.rendererType === 'experimentalWebgl') { </ins> this._enableWebglRenderer(); } else { this._disposeOfWebglRenderer(); <del> this._safeSetOption('rendererType', config.rendererType === 'auto' ? 'canvas' : config.rendererType); </del> <ins> this._safeSetOption('rendererType', (config.rendererType === 'auto' && suggestedRendererType === 'dom') ? 'dom' : (config.rendererType === 'dom' ? 'dom' : 'canvas')); </ins> } this._refreshEnvironmentVariableInfoWidgetState(this._processManager.environmentVariableInfo); }

} private _disposeOfWebglRenderer(): void { <del> this._webglAddon?.dispose(); </del> <ins> try { this._webglAddon?.dispose(); } catch { // ignore } </ins> this._webglAddon = undefined; }