wayland/dma-buf: Add meta_wayland_dma_buf_fds_for_wayland_buffer

And call it from meta_wayland_buffer_realize. This makes dma-buf fds
available for EGL image type buffers as well.

v2:
* Move buffer->dma_buf.dma_buf assignment value to next line.
  (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1880>
This commit is contained in:
Michel Dänzer
2021-05-22 18:32:44 +02:00
committed by Michel Dänzer
parent f0fd013262
commit 416285d1b7
3 changed files with 56 additions and 1 deletions

View File

@@ -184,6 +184,8 @@ meta_wayland_buffer_realize (MetaWaylandBuffer *buffer)
NULL))
{
buffer->type = META_WAYLAND_BUFFER_TYPE_EGL_IMAGE;
buffer->dma_buf.dma_buf =
meta_wayland_dma_buf_fds_for_wayland_buffer (buffer);
return TRUE;
}
}