wayland: rename wayland_format to compositor_format

Cosmetic. This is to better indicate that these formats come from the
compositor.
This commit is contained in:
Dudemanguy 2024-09-07 18:45:15 -05:00
parent d02f03bc2b
commit 7d4abdbd45
3 changed files with 8 additions and 8 deletions

View File

@ -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]);

View File

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

View File

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