mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bastian Krause <bst@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Krause <bst@pengutronix.de>
Subject: [ptxdist] [PATCH v3 3/3] wpewebkit: version bump 2.28.4 -> 2.30.1
Date: Thu, 22 Oct 2020 10:25:00 +0200	[thread overview]
Message-ID: <20201022082500.20644-3-bst@pengutronix.de> (raw)
In-Reply-To: <20201022082500.20644-1-bst@pengutronix.de>

ENABLE_ACCELERATED_2D_CANVAS=ON is broken on 2.30.1. It defaults to off
and does not really improve performance on embedded devices
(paraphrasing the wpewebkit maintainers). There was even discussion to
turn it into a private option [1]. So turn it off.

wpewebkit depends on gstreamer for audio/video playback and more.
The required plugin packages are already selected, but not all plugins
used in Source/WebCore/platform/{audio,graphics,mediastream}/.
Fix that.

While at it, distinguish video/audio plugins and turn
GST_PLUGINS_GOOD1/GST_PLUGINS_BAD1 into runtime dependencies.
Enable/disable the corresponding CMake options ENABLE_VIDEO and
ENABLE_WEB_AUDIO accordingly.

The included patch is needed to make builds with ENABLE_VIDEO=OFF work.

[1] https://bugs.webkit.org/show_bug.cgi?id=148473

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
Changes since v2:
- add patch to make builds with ENABLE_VIDEO=OFF work.
Changes since v1:
- introduce WPEWEBKIT_VIDEO, WPEWEBKIT_AUDIO
- select gst-plugins depending on WPEWEBKIT_VIDEO, WPEWEBKIT_AUDIO
- set ENABLE_VIDEO, ENABLE_WEB_AUDIO according to WPEWEBKIT_VIDEO,
  WPEWEBKIT_AUDIO
- turn GST_PLUGINS_GOOD1, GST_PLUGINS_BAD1 into runtime dependencies
- add missing GST_PLUGINS_BAD1_FDKAAC select
---
 ...tedBundle-guard-setGenericCueAPIEnab.patch | 37 ++++++++++++++
 patches/wpewebkit-2.30.1/series               |  4 ++
 rules/wpewebkit.in                            | 51 +++++++++++++++----
 rules/wpewebkit.make                          | 13 +++--
 4 files changed, 91 insertions(+), 14 deletions(-)
 create mode 100644 patches/wpewebkit-2.30.1/0001-WebProcess-InjectedBundle-guard-setGenericCueAPIEnab.patch
 create mode 100644 patches/wpewebkit-2.30.1/series

diff --git a/patches/wpewebkit-2.30.1/0001-WebProcess-InjectedBundle-guard-setGenericCueAPIEnab.patch b/patches/wpewebkit-2.30.1/0001-WebProcess-InjectedBundle-guard-setGenericCueAPIEnab.patch
new file mode 100644
index 000000000..43d26b9d4
--- /dev/null
+++ b/patches/wpewebkit-2.30.1/0001-WebProcess-InjectedBundle-guard-setGenericCueAPIEnab.patch
@@ -0,0 +1,37 @@
+From: Bastian Krause <bst@pengutronix.de>
+Date: Thu, 22 Oct 2020 10:16:49 +0200
+Subject: [PATCH] WebProcess: InjectedBundle: guard setGenericCueAPIEnabled
+ usage
+
+The declaration in WebCore::Settings is guarded by..
+
+  #if ENABLE(VIDEO) .. #endif
+
+Also guard its use here.
+
+This allows building with ENABLE_VIDEO=OFF.
+
+Signed-off-by: Bastian Krause <bst@pengutronix.de>
+---
+ Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
+index 61326f2e5731..d7776997aa08 100644
+--- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
++++ b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
+@@ -236,12 +236,14 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
+         RuntimeEnabledFeatures::sharedFeatures().setWebRTCMDNSICECandidatesEnabled(enabled);
+ #endif
+ 
++#if ENABLE(VIDEO)
+     if (preference == "WebKitGenericCueAPIEnabled") {
+         WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::genericCueAPIEnabledKey(), enabled);
+         for (auto* page : pages)
+             page->settings().setGenericCueAPIEnabled(enabled);
+         return;
+     }
++#endif
+ 
+ #if ENABLE(GPU_PROCESS)
+     if (preference == "WebKitUseGPUProcessForMedia" || preference == "WebKitCaptureAudioInGPUProcessEnabledKey") {
diff --git a/patches/wpewebkit-2.30.1/series b/patches/wpewebkit-2.30.1/series
new file mode 100644
index 000000000..449999d76
--- /dev/null
+++ b/patches/wpewebkit-2.30.1/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-WebProcess-InjectedBundle-guard-setGenericCueAPIEnab.patch
+# 0e61edb54925f4a5191d0a42856fa1b3  - git-ptx-patches magic
diff --git a/rules/wpewebkit.in b/rules/wpewebkit.in
index d91758406..085eb1c73 100644
--- a/rules/wpewebkit.in
+++ b/rules/wpewebkit.in
@@ -37,16 +37,35 @@ menuconfig WPEWEBKIT
 	select MESALIB_GLES2
 	select LIBEPOXY
 	select LIBGCRYPT
-	select GSTREAMER1
-	select GST_PLUGINS_BASE1
-	select GST_PLUGINS_BASE1_APP
-	select GST_PLUGINS_BASE1_GL
-	select GST_PLUGINS_BASE1_EGL
-	select GST_PLUGINS_GOOD1
-	select GST_PLUGINS_BAD1
+	select GSTREAMER1			if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1		if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_APP 		if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_AUDIOCONVERT	if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_AUDIOMIXER	if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_AUDIORESAMPLE	if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_EGL		if WPEWEBKIT_VIDEO
+	select GST_PLUGINS_BASE1_GIO		if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_GL		if WPEWEBKIT_VIDEO
+	select GST_PLUGINS_BASE1_PLAYBACK	if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BASE1_VIDEOCONVERT	if WPEWEBKIT_VIDEO
+	select GST_PLUGINS_BASE1_VOLUME		if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_GOOD1		if (WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO) && RUNTIME
+	select GST_PLUGINS_GOOD1_AUDIOFX	if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_GOOD1_AUTODETECT	if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_GOOD1_INTERLEAVE	if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_GOOD1_ISOMP4		if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_GOOD1_MATROSKA	if WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO
+	select GST_PLUGINS_GOOD1_VIDEOFILTER	if WPEWEBKIT_VIDEO
+	select GST_PLUGINS_BAD1			if (WPEWEBKIT_VIDEO || WPEWEBKIT_AUDIO) && RUNTIME
+	select GST_PLUGINS_BAD1_FDKAAC		if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BAD1_DEBUGUTILS	if WPEWEBKIT_VIDEO
+	select GST_PLUGINS_BAD1_OPUS		if WPEWEBKIT_AUDIO
+	select GST_PLUGINS_BAD1_SUBENC		if WPEWEBKIT_VIDEO
+	select GST_PLUGINS_BAD1_VIDEOPARSERS	if WPEWEBKIT_VIDEO
 	select WPEBACKEND_FDO
-	select QT5			if WPEWEBKIT_QT
-	select QT5_MODULE_QTDECLARATIVE	if WPEWEBKIT_QT
+	select QT5				if WPEWEBKIT_QT
+	select QT5_MODULE_QTDECLARATIVE		if WPEWEBKIT_QT
+	select SYSTEMD				if WPEWEBKIT_JOURNALD
 	help
 	  WebPlatformForEmbedded port for the WebKit cross-platform web browser engine.
 
@@ -56,4 +75,18 @@ config WPEWEBKIT_QT
 	bool
 	prompt "Qt API"
 
+config WPEWEBKIT_JOURNALD
+	bool
+	depends on INITMETHOD_SYSTEMD
+	default y
+	prompt "journald support"
+
+config WPEWEBKIT_VIDEO
+	bool
+	prompt "video support"
+
+config WPEWEBKIT_AUDIO
+	bool
+	prompt "audio support"
+
 endif
diff --git a/rules/wpewebkit.make b/rules/wpewebkit.make
index c0007d777..2b8f8cd8b 100644
--- a/rules/wpewebkit.make
+++ b/rules/wpewebkit.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_WPEWEBKIT) += wpewebkit
 #
 # Paths and names
 #
-WPEWEBKIT_VERSION	:= 2.28.4
-WPEWEBKIT_MD5		:= 6ab041f6ebdb2e053981de5980c864e7
+WPEWEBKIT_VERSION	:= 2.30.1
+WPEWEBKIT_MD5		:= 251228a6e2917eff90a3eb6e9a7e920d
 WPEWEBKIT		:= wpewebkit-$(WPEWEBKIT_VERSION)
 WPEWEBKIT_SUFFIX	:= tar.xz
 WPEWEBKIT_URL		:= https://wpewebkit.org/releases/$(WPEWEBKIT).$(WPEWEBKIT_SUFFIX)
@@ -35,25 +35,28 @@ WPEWEBKIT_CONF_OPT	:= \
 	$(CROSS_CMAKE_USR) \
 	-G Ninja \
 	-DCMAKE_BUILD_TYPE=Release \
+	-DANALYZERS=OFF \
 	-DDEBUG_FISSION=OFF \
-	-DENABLE_ACCELERATED_2D_CANVAS=ON \
+	-DENABLE_ACCELERATED_2D_CANVAS=OFF \
 	-DENABLE_ACCESSIBILITY=OFF \
 	-DENABLE_BUBBLEWRAP_SANDBOX=OFF \
 	-DENABLE_ENCRYPTED_MEDIA=OFF \
 	-DENABLE_GTKDOC=OFF\
 	-DENABLE_MEDIA_SOURCE=ON \
 	-DENABLE_SHAREABLE_RESOURCE=ON \
-	-DENABLE_VIDEO=ON \
+	-DENABLE_VIDEO=$(call ptx/onoff,PTXCONF_WPEWEBKIT_VIDEO) \
 	-DENABLE_WEBDRIVER=ON \
-	-DENABLE_WEB_AUDIO=ON \
+	-DENABLE_WEB_AUDIO=$(call ptx/onoff,PTXCONF_WPEWEBKIT_AUDIO) \ \
 	-DENABLE_WEB_CRYPTO=ON \
 	-DENABLE_WPE_QT_API=$(call ptx/onoff,PTXCONF_WPEWEBKIT_QT) \
 	-DENABLE_XSLT=ON \
+	-DGCC_OFFLINEASM_SOURCE_MAP=OFF \
 	-DPORT=WPE \
 	-DSHOULD_INSTALL_JS_SHELL=OFF \
 	-DSHOW_BINDINGS_GENERATION_PROGRESS=ON \
 	-DUSE_LD_GOLD=OFF \
 	-DUSE_OPENJPEG=OFF \
+	-DUSE_SYSTEMD=$(call ptx/onoff,PTXCONF_WPEWEBKIT_JOURNALD) \
 	-DUSE_THIN_ARCHIVES=ON \
 	-DUSE_WOFF2=OFF \
 	-DWTF_CPU_ARM64_CORTEXA53=OFF
-- 
2.28.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

  parent reply	other threads:[~2020-10-22  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  8:24 [ptxdist] [PATCH v3 1/3] libwpe: version bump 1.6.0 -> 1.8.0 Bastian Krause
2020-10-22  8:24 ` [ptxdist] [PATCH v3 2/3] wpebackend-fdo: version bump 1.6.1 " Bastian Krause
2020-10-30 12:02   ` [ptxdist] [APPLIED] " Michael Olbrich
2020-10-22  8:25 ` Bastian Krause [this message]
2020-10-30 12:02   ` [ptxdist] [APPLIED] wpewebkit: version bump 2.28.4 -> 2.30.1 Michael Olbrich
2020-10-30 12:02 ` [ptxdist] [APPLIED] libwpe: version bump 1.6.0 -> 1.8.0 Michael Olbrich

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=20201022082500.20644-3-bst@pengutronix.de \
    --to=bst@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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