Add configure option --enable-gtk4-hwaccel to use GtkSnapshot for rendering in the GTK4 GUI.
Compared to #20324, the implementation is cleaner and more readable. I tried experimenting with other possible ways to make things simpler, but I did not get very far.
The performance boost on my machine is noticeable (both compiled using same optimized flags with laptop running on battery):
Current rendering path:
https://github.com/user-attachments/assets/d8cab615-ed3e-4226-a07b-5c6dac24a9a4
The excessive lag at the start is probably due to the CPU being too slow to react? However that may as well also be another issue.
Hardawre accelerated rendering path:
https://github.com/user-attachments/assets/4947881b-fff1-4382-87a3-8d1c58793ae2
https://github.com/vim/vim/pull/20437
(12 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
IMO, For users who build Vim themselves, GTK4 hwaccel should probably be auto rather than manual opt-in. GTK4/GSK can choose the appropriate renderer based on the runtime environment, and better accelerated rendering is one of the main reasons to choose GTK4 over GTK3.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
IMO, For users who build Vim themselves, GTK4 hwaccel should probably be auto rather than manual opt-in. GTK4/GSK can choose the appropriate renderer based on the runtime environment, and better accelerated rendering is one of the main reasons to choose GTK4 over GTK3.
I think we should initially keep it optional for now for a bit so users can test and report any bugs/crashes. Then when its stable enough we can fully switch over.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()