From 5652c61c069e87bad14467eb4509840b6b55bc8a Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 13 Dec 2023 18:56:43 +0100 Subject: [PATCH] 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: --- src/tests/wayland-test-clients/wayland-test-client-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/wayland-test-clients/wayland-test-client-utils.c b/src/tests/wayland-test-clients/wayland-test-client-utils.c index 23f569337..1a8e38eea 100644 --- a/src/tests/wayland-test-clients/wayland-test-client-utils.c +++ b/src/tests/wayland-test-clients/wayland-test-client-utils.c @@ -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);