[PATCH xserver 2/5] xwayland: move egl_backend to its own struct

Emil Velikov emil.l.velikov at gmail.com
Tue Jun 5 10:26:14 UTC 2018


On 1 June 2018 at 15:31, Olivier Fourdan <ofourdan at redhat.com> wrote:
> EGL backend availability requires both EGL extensions and Wayland
> interfaces to be present, so we will need to consider multiple backends
> during initialization.
>
> As a preliminary work, move the egl_backend to its own struct so that we
> can have more than one backend at any given time.
>
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
> ---
>  hw/xwayland/xwayland.h | 99 ++++++++++++++++++++++--------------------
>  1 file changed, 51 insertions(+), 48 deletions(-)
>
> diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
> index 0d4afdf8a..0d6a4c246 100644
> --- a/hw/xwayland/xwayland.h
> +++ b/hw/xwayland/xwayland.h
> @@ -57,6 +57,56 @@ struct xwl_format {
>
>  struct xwl_pixmap;
>  struct xwl_window;
> +struct xwl_screen;
> +
> +struct xwl_egl_backend {
> +    /* Called once for each interface in the global registry. Backends
> +     * should use this to bind to any wayland interfaces they need. This
> +     * callback is optional.
> +     */
Since both backends implement this, I'd drop the "optional" statement
alongside the NULL check in the code.
Might be better to keep as separate patch though.

-Emil


More information about the xorg-devel mailing list