From 7d4abdbd452fa8bb22172fd3ce333bbf5134bf0d Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 7 Sep 2024 18:45:15 -0500 Subject: [PATCH] wayland: rename wayland_format to compositor_format Cosmetic. This is to better indicate that these formats come from the compositor. --- video/out/wayland_common.c | 6 +++--- video/out/wayland_common.h | 6 +++--- video/out/wldmabuf/ra_wldmabuf.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index bc56134f5f..7deded44ae 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1361,8 +1361,8 @@ static void format_table(void *data, close(fd); if (map != MAP_FAILED) { - wl->format_map = map; - wl->format_size = size; + wl->compositor_format_map = map; + wl->compositor_format_size = size; } } @@ -2931,7 +2931,7 @@ void vo_wayland_uninit(struct vo *vo) if (wl->display) wl_display_disconnect(wl->display); - munmap(wl->format_map, wl->format_size); + munmap(wl->compositor_format_map, wl->compositor_format_size); for (int n = 0; n < 2; n++) close(wl->wakeup_pipe[n]); diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index 105761698a..244cb71258 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -28,7 +28,7 @@ typedef struct { uint32_t format; uint32_t padding; uint64_t modifier; -} wayland_format; +} compositor_format; struct vo_wayland_state { struct m_config_cache *opts_cache; @@ -104,8 +104,8 @@ struct vo_wayland_state { /* linux-dmabuf */ struct zwp_linux_dmabuf_v1 *dmabuf; struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback; - wayland_format *format_map; - uint32_t format_size; + compositor_format *compositor_format_map; + uint32_t compositor_format_size; /* presentation-time */ struct wp_presentation *presentation; diff --git a/video/out/wldmabuf/ra_wldmabuf.c b/video/out/wldmabuf/ra_wldmabuf.c index 3f2731429a..fa85e7768d 100644 --- a/video/out/wldmabuf/ra_wldmabuf.c +++ b/video/out/wldmabuf/ra_wldmabuf.c @@ -32,9 +32,9 @@ bool ra_compatible_format(struct ra* ra, uint32_t drm_format, uint64_t modifier) { struct priv* p = ra->priv; struct vo_wayland_state *wl = p->vo->wl; - const wayland_format *formats = wl->format_map; + const compositor_format *formats = wl->compositor_format_map; - for (int i = 0; i < wl->format_size / sizeof(wayland_format); i++) { + for (int i = 0; i < wl->compositor_format_size / sizeof(compositor_format); i++) { if (drm_format == formats[i].format && modifier == formats[i].modifier) return true; }