From: Christoffer Aasted Date: Sun, 14 Jun 2026 15:46:12 +0000 (+0000) Subject: patch 9.2.0646: GTK3 GUI slow on HiDPI/4K with software rendering X-Git-Tag: v9.2.0646^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f58fc39e206d45e9c82a8936a2c28fa6422ce47;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index b99f49062f..5fe1ea730b 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 4a8bfe8213..959bc0f9af 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, /**/