shm: fix compilation on pixman without PIXMAN_rgba_float16

This commit is contained in:
Daniel Eklöf 2025-05-01 09:49:47 +02:00
parent 8faea42d9e
commit d6a40dee35
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 12 additions and 4 deletions

7
shm.c
View file

@ -984,9 +984,11 @@ shm_chain_new(struct wayland *wayl, bool scrollable, size_t pix_instances,
enum wl_shm_format shm_fmt_with_alpha = WL_SHM_FORMAT_ARGB8888;
static bool have_logged = false;
static bool have_logged_16f_fallback = false;
static bool have_logged_10_fallback = false;
#if defined(HAVE_PIXMAN_RGBA_FLOAT16)
static bool have_logged_16f_fallback = false;
if (desired_bit_depth == SHM_BITS_16F) {
if (wayl->shm_have_abgr161616f && wayl->shm_have_xbgr161616f) {
pixman_fmt_without_alpha = PIXMAN_rgba_float16;
@ -1010,6 +1012,7 @@ shm_chain_new(struct wayland *wayl, bool scrollable, size_t pix_instances,
}
}
}
#endif
if (desired_bit_depth == SHM_BITS_10 ||
(desired_bit_depth == SHM_BITS_16F &&
@ -1097,7 +1100,9 @@ shm_chain_bit_depth(const struct buffer_chain *chain)
return fmt == PIXMAN_a8r8g8b8
? SHM_BITS_8
#if defined(HAVE_PIXMAN_RGBA_FLOAT16)
: fmt == PIXMAN_rgba_float16
? SHM_BITS_16F
#endif
: SHM_BITS_10;
}