From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Devoogdt <thomas@devoogdt.com>
Cc: Adrian Perez de Castro <aperez@igalia.com>,
Thomas Devoogdt <thomas.devoogdt@barco.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2 2/4] package/webkitgtk: allow both X11 and Wayland
Date: Fri, 22 Sep 2023 18:01:24 +0200 [thread overview]
Message-ID: <20230922160124.GQ512384@scaer> (raw)
In-Reply-To: <20230909075753.7471-2-thomas@devoogdt.com>
Thomas, Adrian, All,
On 2023-09-09 09:57 +0200, Thomas Devoogdt spake thusly:
> From: Adrian Perez de Castro <aperez@igalia.com>
>
> Allow enabling support for both the X11 and Wayland backends.
>
> This in turn needs reorganizing how desktop GL or OpenGL ES is chosen,
> as it no longer can depend on whether Wayland support is enabled: the
> BR2_PACKAGE_HAS_LIBGL and BR2_PACKAGE_HAS_LIBGLES variables are both
> checked, and ENABLE_GLES2 is set only if the package providing OpenGL
> claims only GLES is supported; otherwise desktop GL is preferred. This
> matches the existing logic.
>
> The existing comment indicating that only one of both windowing systems
> can be enabled was wrong: the same WebKitGTK build can target both
> X11 and Wayland at the same time, as long as GTK itself has been built
> accordingly. Enabling both is the approach taken by most Linux
> distributions, and has been supported for years.
>
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> v2: dropped info debug line
> ---
> package/webkitgtk/webkitgtk.mk | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk
> index 71599477f2..bb6df3d592 100644
> --- a/package/webkitgtk/webkitgtk.mk
> +++ b/package/webkitgtk/webkitgtk.mk
> @@ -80,32 +80,32 @@ else
> WEBKITGTK_CONF_OPTS += -DENABLE_GAMEPAD=OFF
> endif
>
> -# Only one target platform can be built, assume X11 > Wayland
> +# Use GLES if available and desktop GL is not.
> +ifeq ($(BR2_PACKAGE_HAS_LIBGL):$(BR2_PACKAGE_HAS_LIBGLES),:y)
> +WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON
> +WEBKITGTK_DEPENDENCIES += libgles
> +else
> +WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF
> +endif
>
> -# GTK3-X11 target gives OpenGL from newer libgtk3 versions
> -# Consider this better than EGL + maybe GLESv2 since both can't be built
> -# 2D CANVAS acceleration requires OpenGL proper with cairo-gl
> ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
> -WEBKITGTK_CONF_OPTS += \
> - -DENABLE_GLES2=OFF \
> - -DENABLE_X11_TARGET=ON
> +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=ON
> WEBKITGTK_DEPENDENCIES += libgl \
> xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt
> -else # !X11
> -# GTK3-BROADWAY/WAYLAND needs at least EGL
> -WEBKITGTK_DEPENDENCIES += libegl
> -# GLESv2 support is optional though
> -ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
> -WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=ON
> -WEBKITGTK_DEPENDENCIES += libgles
> else
> -# Disable general OpenGL (shading) if there's no GLESv2
> -WEBKITGTK_CONF_OPTS += -DENABLE_GLES2=OFF
> +WEBKITGTK_CONF_OPTS += -DENABLE_X11_TARGET=OFF
> endif
> -# We must explicitly state the wayland target
> +
> ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y)
> WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON
> +WEBKITGTK_DEPENDENCIES += libegl
> +else
> +WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=OFF
> endif
> +
> +# If only the GTK Broadway backend is enabled, EGL is still needed.
> +ifeq ($(BR2_PACKAGE_LIBGTK3_X11):$(BR2_PACKAGE_LIBGTK3_WAYLAND):$(BR2_PACKAGE_LIBGTK3_BROADWAY),::y)
> +WEBKITGTK_DEPENDENCIES += libegl
> endif
>
> ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND)$(BR2_PACKAGE_WPEBACKEND_FDO),yy)
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-09-22 16:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-09 7:57 [Buildroot] [PATCH v2 1/4] package/webkitgtk: security bump to version 2.40.5 Thomas Devoogdt
2023-09-09 7:57 ` [Buildroot] [PATCH v2 2/4] package/webkitgtk: allow both X11 and Wayland Thomas Devoogdt
2023-09-22 16:01 ` Yann E. MORIN [this message]
2023-09-09 7:57 ` [Buildroot] [PATCH v2 3/4] package/webkitgtk: make gbm support optional Thomas Devoogdt
2023-09-09 7:57 ` [Buildroot] [PATCH v2 4/4] package/webkitgtk: add a USE_OPENGL_OR_ES config option Thomas Devoogdt
2023-09-22 16:01 ` [Buildroot] [PATCH v2 1/4] package/webkitgtk: security bump to version 2.40.5 Yann E. MORIN
2023-09-26 6:06 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230922160124.GQ512384@scaer \
--to=yann.morin.1998@free.fr \
--cc=aperez@igalia.com \
--cc=buildroot@buildroot.org \
--cc=thomas.devoogdt@barco.com \
--cc=thomas@devoogdt.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox