mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
tests/wayland-test-clients: Use ARGB dma-buf format for YUYV buffers
They are the same for our purposes of allocating a linear buffer and writing to the CPU mapping, but the ARGB format is widely supported and the YUYV format is not. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3371>
This commit is contained in:
parent
c0832b99d8
commit
ff3b8197fd
@ -1115,6 +1115,12 @@ alloc_dmabuf_ycbcr (WaylandBuffer *buffer,
|
||||
|
||||
switch (priv->format)
|
||||
{
|
||||
case DRM_FORMAT_YUYV:
|
||||
dmabuf->n_planes = 1;
|
||||
formats[0] = DRM_FORMAT_ARGB8888;
|
||||
hsub[0] = 2;
|
||||
vsub[0] = 1;
|
||||
break;
|
||||
case DRM_FORMAT_NV12:
|
||||
dmabuf->n_planes = 2;
|
||||
formats[0] = DRM_FORMAT_R8;
|
||||
@ -1249,8 +1255,8 @@ wayland_buffer_dmabuf_allocate (WaylandBuffer *buffer,
|
||||
{
|
||||
case DRM_FORMAT_ARGB8888:
|
||||
case DRM_FORMAT_XRGB8888:
|
||||
case DRM_FORMAT_YUYV:
|
||||
return alloc_dmabuf_simple (buffer, n_modifiers, modifiers, bo_flags);
|
||||
case DRM_FORMAT_YUYV:
|
||||
case DRM_FORMAT_NV12:
|
||||
case DRM_FORMAT_P010:
|
||||
case DRM_FORMAT_YUV420:
|
||||
|
Loading…
Reference in New Issue
Block a user