diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-06-16 16:30:43 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-06-20 16:58:40 +0000 |
| commit | fabffd626b6bdeed624c0980f36283a902b2f864 (patch) | |
| tree | fb9b543077f742e88adf0b4d8b441d3a55eefb93 /wayland.c | |
| parent | key-binding: set BIND_ACTION_KEY_COUNT correctly (diff) | |
wayland: log human readable SHM format names in debug builds
Diffstat (limited to 'wayland.c')
| -rw-r--r-- | wayland.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -27,6 +27,7 @@ #include "render.h" #include "selection.h" #include "shm.h" +#include "shm-formats.h" #include "util.h" #include "xmalloc.h" @@ -227,6 +228,22 @@ static void shm_format(void *data, struct wl_shm *wl_shm, uint32_t format) { struct wayland *wayl = data; + +#if defined(_DEBUG) + bool have_description = false; + + for (size_t i = 0; i < ALEN(shm_formats); i++) { + if (shm_formats[i].format == format) { + LOG_DBG("shm: 0x%08x: %s", format, shm_formats[i].description); + have_description = true; + break; + } + } + + if (!have_description) + LOG_DBG("shm: 0x%08x: unknown", format); +#endif + if (format == WL_SHM_FORMAT_ARGB8888) wayl->have_argb8888 = true; } |
