tests/wayland-test-clients: Use stride of the first plane

The assumption is that all planes are always contiguous, and we don't
have any multi-plane formats where the first plane is subsampled.

The stride of the entire buffer is then just the stride of the first
plane and the stride of the other planes is derived from that.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3371>
This commit is contained in:
Sebastian Wick 2023-12-13 18:56:43 +01:00 committed by Marge Bot
parent 005ede7702
commit 5652c61c06

View File

@ -973,7 +973,7 @@ wayland_buffer_shm_allocate (WaylandBuffer *buffer,
pool = wl_shm_create_pool (display->shm, fd, shm->size);
priv->buffer = wl_shm_pool_create_buffer (pool, 0,
priv->width, priv->height,
shm->size / priv->height,
shm->stride[0],
shm_format);
wl_shm_pool_destroy (pool);