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
This commit is contained in:
Daniel Eklöf 2025-05-01 08:34:49 +02:00
parent b07ce56321
commit e5a0755451
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
13 changed files with 105 additions and 71 deletions

View file

@ -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;
}