Commit: patch 9.2.0646: GTK3 GUI slow on HiDPI/4K with software rendering

0 views
Skip to first unread message

Christian Brabandt

unread,
12:00 PM (2 hours ago) 12:00 PM
to vim...@googlegroups.com
patch 9.2.0646: GTK3 GUI slow on HiDPI/4K with software rendering

Commit: https://github.com/vim/vim/commit/0f58fc39e206d45e9c82a8936a2c28fa6422ce47
Author: Christoffer Aasted <dez...@gmail.com>
Date: Sun Jun 14 15:46:12 2026 +0000

patch 9.2.0646: GTK3 GUI slow on HiDPI/4K with software rendering

Problem: GTK3 GUI slow on HiDPI/4K with software rendering
Solution: Turn off Alpha rendering processing (Christoffer Aasted)

Reduces the processing load significantly, since it contains no alpha
channel.

https://www.cairographics.org/manual/cairo-cairo-surface-t.html#CAIRO-CONTENT-COLOR-ALPHA:CAPS

Tested on aarch64 with a rpi5 and 4k/hidpi integer scaling.

Slowest gvim I have encountered yet.

Slow symptoms;
* Startup
* Scrolling
* Drawing text
* Loading new buffers

related: #18002
closes: #20513

Signed-off-by: Christoffer Aasted <dez...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index b99f49062..5fe1ea730 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -814,7 +814,7 @@ scale_factor_event(GtkWidget *widget,
gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
gui.surface = gdk_window_create_similar_surface(
gtk_widget_get_window(widget),
- CAIRO_CONTENT_COLOR_ALPHA,
+ CAIRO_CONTENT_COLOR,
w, h);

int usable_height = h;
@@ -2900,7 +2900,7 @@ drawarea_realize_cb(GtkWidget *widget, gpointer data UNUSED)
#if GTK_CHECK_VERSION(3,0,0)
gui.surface = gdk_window_create_similar_surface(
gtk_widget_get_window(widget),
- CAIRO_CONTENT_COLOR_ALPHA,
+ CAIRO_CONTENT_COLOR,
gtk_widget_get_allocated_width(widget),
gtk_widget_get_allocated_height(widget));
#else
@@ -3035,7 +3035,7 @@ drawarea_configure_event_cb(GtkWidget *widget,

gui.surface = gdk_window_create_similar_surface(
gtk_widget_get_window(widget),
- CAIRO_CONTENT_COLOR_ALPHA,
+ CAIRO_CONTENT_COLOR,
event->width, event->height);

gtk_widget_queue_draw(widget);
diff --git a/src/version.c b/src/version.c
index 4a8bfe821..959bc0f9a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 646,
/**/
645,
/**/
Reply all
Reply to author
Forward
0 new messages