Expose an internal API that will let us plug in a separate render stack #221202
Labels
editor-gpu
Editor GPU rendering related issues
feature-request
Request for new features or functionality
Milestone
Parent issue: #221145
The initial plan with the webgpu based is to provide a separate mode via a setting (
editor.gpuAcceleration: 'on' | 'off'
?) which will switch the rendering stack to a GPU-based one. The first step is for this renderer to simply fallback entirely to rendering lines using the DOM such that we can start self hosting on it and then incrementally swap out parts to render onto a canvas.Some requirements:
.view-lines
). Eventually we want to swap out the line numbers as well (.margin-view-overlays .line-numbers
) since they're relatively expensive, ideally we would share the canvas for this.You can look at the parts outside of the
gpu/
intyriar/gpu_exploration
for the parts that I needed to hook into to get it to work. Note thatdisableNonGpuRendering
can mostly be ignored initially, this was used get a better idea of the kind of numbers if we could theoretically get by removing almost all DOM interaction.VisibleLinesCollection
owned the canvas and renderer:vscode/src/vs/editor/browser/view/viewLayer.ts
Line 262 in 4f7eede
vscode/src/vs/editor/browser/view/viewLayer.ts
Line 362 in 4f7eede
VisibleLinesCollection
disabledViewLayerRenderer
being created (would be needed for fallback?):vscode/src/vs/editor/browser/view/viewLayer.ts
Lines 368 to 370 in 4f7eede
Forcing the DOM node to not shift around was done in
ViewLines
:vscode/src/vs/editor/browser/viewParts/lines/viewLines.ts
Lines 613 to 614 in 4f7eede
vscode/src/vs/editor/browser/viewParts/lines/viewLines.ts
Lines 667 to 671 in 4f7eede
The text was updated successfully, but these errors were encountered: