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:
parent
005ede7702
commit
5652c61c06
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user