xserver/hw/xwayland
Olivier Fourdan 1c6f875f52 xwayland: Add multiple window buffering support
Add a mechanism to create, recycle and destroy window buffers when
needed.

Typically, this adds a new `xwl_window_buffer` structure which
represents a buffer for a given Xwayland window.

Each Xwayland window has two different pools of buffers:

 - The available buffers pool:
   Those are buffers which where created previously and that have either
   not been submitted to the compositor or submitted and released.

 - The unavailable buffers pool:
   Those are typically the buffers which are being used by the
   compositor, awaiting a release.

Initially, an Xwayland window starts with both pools empty. As soon as a
new buffer is needed, it's either created (if there is none available)
or picked from the pool of available buffers.

Once submitted to the compositor, the buffer is moved to the pool of
unavailable buffers. When the corresponding `wl_buffer` is released by
the compositor, it is moved back to pool of available buffers again to
be reused when needed.

To avoid keeping too many buffers around doing nothing, a garbage
collection of older, unused buffers also takes care of disposing the
buffers being unused for some time.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2019-11-28 17:32:44 +01:00
..
.gitignore xwayland: Add wp_viewport wayland extension support 2019-10-12 12:19:14 +02:00
Makefile.am xwayland: Add multiple window buffering support 2019-11-28 17:32:44 +01:00
drm.xml wayland: Sync drm.xml with Mesa 2017-07-05 10:13:04 -04:00
meson.build xwayland: Add multiple window buffering support 2019-11-28 17:32:44 +01:00
xwayland-cursor.c xwayland: Use buffer_damage instead of surface damage if available 2019-10-12 12:19:14 +02:00
xwayland-cvt.c xwayland: Add hack for FWXGA resolution #99574 2017-02-08 12:32:16 -05:00
xwayland-glamor-eglstream.c xwayland: Add buffer release callback 2019-11-28 17:32:44 +01:00
xwayland-glamor-gbm.c xwayland: Add buffer release callback 2019-11-28 17:32:44 +01:00
xwayland-glamor-xv.c xwayland: use the lowercase xnf.*alloc API 2017-09-06 08:56:39 +10:00
xwayland-glamor.c glamor/xwayland: Define EGL_NO_X11 2019-11-04 20:49:33 +01:00
xwayland-glx.c glamor/xwayland: Define EGL_NO_X11 2019-11-04 20:49:33 +01:00
xwayland-input.c xwayland: Add support for randr-resolution change emulation using viewport 2019-10-12 12:19:14 +02:00
xwayland-output.c xserver: Fix a typo 2019-10-16 18:57:31 +00:00
xwayland-present.c xwayland: Add buffer release callback 2019-11-28 17:32:44 +01:00
xwayland-shm.c xwayland: Add buffer release callback 2019-11-28 17:32:44 +01:00
xwayland-vidmode.c xwayland: Add vidmode mode changing emulation support 2019-10-12 12:19:14 +02:00
xwayland-window-buffers.c xwayland: Add multiple window buffering support 2019-11-28 17:32:44 +01:00
xwayland-window-buffers.h xwayland: Add multiple window buffering support 2019-11-28 17:32:44 +01:00
xwayland.c xwayland: Add buffer release callback 2019-11-28 17:32:44 +01:00
xwayland.h xwayland: Add multiple window buffering support 2019-11-28 17:32:44 +01:00