ui/surface: allocate shared memory on !win32
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 8 Oct 2024 12:50:21 +0000 (16:50 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 14 Oct 2024 13:34:09 +0000 (17:34 +0400)
commitec818df0005d1598d249f0cfea557226b6ad89a6
tree897d6527cc04984e29ab102f48a2d9aaf9e43425
parent28a3ca04782c5b72b85e197ccfab287a66ce76cb
ui/surface: allocate shared memory on !win32

Use qemu_memfd_alloc() to allocate the display surface memory, which
will fallback on tmpfile/mmap() on systems without memfd, and allow to
share the display with other processes.

This is similar to how display memory is allocated on win32 since commit
09b4c198 ("console/win32: allocate shareable display surface").

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20241008125028.1177932-13-marcandre.lureau@redhat.com>
include/ui/surface.h
ui/console.c