[PATCH xserver 0/5] Refactor egl_backends for wayland registry

Olivier Fourdan ofourdan at redhat.com
Fri Jun 1 14:31:37 UTC 2018


Hi all,

The idea is to be able to use EGL Streams if we can, without requiring the
compositor to add "-eglstream" to the Xwayland command line, Xwayland would
automatically try EGL streams backend if it can.

To be able to use an EGL backend, we need:

 - The required EGL extension(s) to be supported
 - The required Wayland interface(s) to be available.

The former is pretty easy, but the later requires to be connected to the
Wayland display to query the Wayland registry.

As the Wayland interfaces depend on the EGL backend being considered, we
need to initialize all the backends, based on the EGL extensions available,
and eventually choose which one to use based on the Wayland interfaces
availability.

The following patch series does that, by refactoring the existing code to
have multiple EGL backends at first and be able to point to the one to
use eventually.

With this, if both GBM and EGL streams are available and usable, we would
select GBM, but if GBM is not available or not usable, we would automatically
try EGL streams, if available. And failing that, we would use SW.

That makes the use of the command line "-eglstream" optional, yet if
specified, it forces the EGL stream backend as before (and fallback to
SW if EGL stream is not available, again, just as before).

This new patch series applies on top of the previously submitted series:

  https://patchwork.freedesktop.org/series/43704/

And supersedes the previous patch series:

  https://patchwork.freedesktop.org/series/43783/
  https://patchwork.freedesktop.org/series/43931/

Which will be marked as such in patchwork.

Cheers,
Olivier

Olivier Fourdan (5):
  xwayland: Move glamor specific routines
  xwayland: move egl_backend to its own struct
  xwayland: Add Wayland interfaces check
  xwayland: Move egl_backends init to glamor
  xwayland: refactor egl_backends for wayland registry

 hw/xwayland/xwayland-glamor-eglstream.c | 124 ++++++++++++++++--
 hw/xwayland/xwayland-glamor-gbm.c       |  50 ++++++--
 hw/xwayland/xwayland-glamor.c           | 163 +++++++++++-------------
 hw/xwayland/xwayland-present.c          |   7 +-
 hw/xwayland/xwayland.c                  |  26 ++--
 hw/xwayland/xwayland.h                  | 141 +++++++++++---------
 6 files changed, 319 insertions(+), 192 deletions(-)

-- 
2.17.0



More information about the xorg-devel mailing list