From 2a8948a3f32eaa6894457dcbf5aced57bdd91853 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 1 May 2025 08:34:49 +0200 Subject: config: tweak.surface-bit-depth now defaults to 'auto' When set to 'auto', use 10-bit surfaces if gamma-correct blending is enabled, and 8-bit surfaces otherwise. Note that we may still fallback to 8-bit surfaces (without disabling gamma-correct blending) if the compositor does not support 10-bit surfaces. Closes #2082 --- wayland.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'wayland.c') diff --git a/wayland.c b/wayland.c index 9b143508..320f03aa 100644 --- a/wayland.c +++ b/wayland.c @@ -2640,3 +2640,10 @@ wayl_activate(struct wayland *wayl, struct wl_window *win, const char *token) xdg_activation_v1_activate(wayl->xdg_activation, token, win->surface.surf); } + +bool +wayl_do_linear_blending(const struct wayland *wayl, const struct config *conf) +{ + return conf->gamma_correct && + wayl->color_management.img_description != NULL; +} -- cgit v1.3