Cosmetic. This is to better indicate that these formats come from the compositor.
Unified · Split
| @@ -1361,8 +1361,8 @@ static void format_table(void *data, · 1360 unmodified lines | |||
| 1361 | close(fd); | 1361 | close(fd); |
| 1362 | 1362 | ||
| 1363 | if (map != MAP_FAILED) { | 1363 | if (map != MAP_FAILED) { |
| 1364 | wl->format_map = map; | 1364 | wl->compositor_format_map = map; |
| 1365 | wl->format_size = size; | 1365 | wl->compositor_format_size = size; |
| 1366 | } | 1366 | } |
| 1367 | } | 1367 | } |
| 1368 | 1368 | ||
| @@ -2931,7 +2931,7 @@ void vo_wayland_uninit(struct vo *vo) · 1562 unmodified lines | |||
| 2931 | if (wl->display) | 2931 | if (wl->display) |
| 2932 | wl_display_disconnect(wl->display); | 2932 | wl_display_disconnect(wl->display); |
| 2933 | 2933 | ||
| 2934 | munmap(wl->format_map, wl->format_size); | 2934 | munmap(wl->compositor_format_map, wl->compositor_format_size); |
| 2935 | 2935 | ||
| 2936 | for (int n = 0; n < 2; n++) | 2936 | for (int n = 0; n < 2; n++) |
| 2937 | close(wl->wakeup_pipe[n]); | 2937 | close(wl->wakeup_pipe[n]); |
| @@ -28,7 +28,7 @@ typedef struct { · 27 unmodified lines | |||
| 28 | uint32_t format; | 28 | uint32_t format; |
| 29 | uint32_t padding; | 29 | uint32_t padding; |
| 30 | uint64_t modifier; | 30 | uint64_t modifier; |
| 31 | } wayland_format; | 31 | } compositor_format; |
| 32 | 32 | ||
| 33 | struct vo_wayland_state { | 33 | struct vo_wayland_state { |
| 34 | struct m_config_cache *opts_cache; | 34 | struct m_config_cache *opts_cache; |
| @@ -104,8 +104,8 @@ struct vo_wayland_state { · 69 unmodified lines | |||
| 104 | /* linux-dmabuf */ | 104 | /* linux-dmabuf */ |
| 105 | struct zwp_linux_dmabuf_v1 *dmabuf; | 105 | struct zwp_linux_dmabuf_v1 *dmabuf; |
| 106 | struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback; | 106 | struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback; |
| 107 | wayland_format *format_map; | 107 | compositor_format *compositor_format_map; |
| 108 | uint32_t format_size; | 108 | uint32_t compositor_format_size; |
| 109 | 109 | ||
| 110 | /* presentation-time */ | 110 | /* presentation-time */ |
| 111 | struct wp_presentation *presentation; | 111 | struct wp_presentation *presentation; |
| @@ -32,9 +32,9 @@ bool ra_compatible_format(struct ra* ra, uint32_t drm_format, uint64_t modifier) · 31 unmodified lines | |||
| 32 | { | 32 | { |
| 33 | struct priv* p = ra->priv; | 33 | struct priv* p = ra->priv; |
| 34 | struct vo_wayland_state *wl = p->vo->wl; | 34 | struct vo_wayland_state *wl = p->vo->wl; |
| 35 | const wayland_format *formats = wl->format_map; | 35 | const compositor_format *formats = wl->compositor_format_map; |
| 36 | 36 | ||
| 37 | for (int i = 0; i < wl->format_size / sizeof(wayland_format); i++) { | 37 | for (int i = 0; i < wl->compositor_format_size / sizeof(compositor_format); i++) { |
| 38 | if (drm_format == formats[i].format && modifier == formats[i].modifier) | 38 | if (drm_format == formats[i].format && modifier == formats[i].modifier) |
| 39 | return true; | 39 | return true; |
| 40 | } | 40 | } |