macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.53k stars 685 forks source link

Implement Metal renderer for MacVim #1262

Open ychin opened 2 years ago

ychin commented 2 years ago

We should implement a Metal-based text renderer for MacVim. #858 fixed a lot of the issues with the previous way MacVim rendered text and laid the grounds work by storing the buffer of the text so it could be redrawn. However, it is not as fast as it could be because it relies on software rendering and on scrolling (or other events) it needs to redraw quite a fair amount of texts, leading to scrolling not being as smooth as it could be.

Implementing a proper Metal renderer would allow us to get the native scrolling performance back as it's trivial to submit redraws.

There are also other downstream features (some in experimentation) that would need the Metal renderer to work properly. For example, if we want per-pixel scrolling (#273), we need a high-enough frame rate to be able to generate a smooth animation. Other special animation effects such as locating cursors, or cursor animations would all benefit from a Metal renderer.

Also see #1259 for performance issue with it.