wayland: Create EGLStream-backed buffers through wl_eglstream_controller

Desktop / GNOME / Mutter - Miguel A. Vico [nvidia.com] - 15 June 2018 20:45 UTC

One of the current limitations of EGLStreams is that there's no way to resize a surface consumer without re-creating the entire stream.

Therefore, while resizing, clients will send wl_surface::attach requests so the compositor can re-create its endpoint of the stream, but no buffer will be available actually. If we proceed with the rest of the attach operation we'll be presenting an empty buffer.

In order to fix this, a separate wl_eglstream_controller protocol has been introduced that clients can use to request a stream re-creation without overloading wl_surface::attach for that purpose.

This change adds the required logic to create the corresponding wl_eglstream_controller global interface that clients can bind to.

Whenever a client requests a stream to be created, we just need to create and realize the new EGLStream buffer. The same buffer resource will be given at a later time to wl_surface::attach, whenever new content is made available by the application, so we can proceed to acquire the stream buffer and update the surface state.

https://bugzilla.gnome.org/show_bug.cgi?id=782575

435b3c4bd wayland: Create EGLStream-backed buffers through wl_eglstream_controller
.gitignore | 1 +
configure.ac | 12 +++++
src/Makefile.am | 8 +++
src/wayland/meta-wayland-egl-stream.c | 98 +++++++++++++++++++++++++++++++++++
src/wayland/meta-wayland-egl-stream.h | 2 +
src/wayland/meta-wayland.c | 3 ++
6 files changed, 124 insertions(+)

Upstream: git.gnome.org


  • Share