diff --git a/meta-digi-dey/conf/distro/dey.conf b/meta-digi-dey/conf/distro/dey.conf index 8c8048b5a..7357bbc30 100644 --- a/meta-digi-dey/conf/distro/dey.conf +++ b/meta-digi-dey/conf/distro/dey.conf @@ -66,6 +66,11 @@ PREFERRED_VERSION_bluez5 ?= "5.72" # ensure compatibility with the old API. PREFERRED_VERSION_libgpiod ?= "1.6.4" +# Starting in wpewebkit 2.46.1, our ConnectCore demo is broken due to clicks +# not being registered in the demo's main area. This doesn't happen in 2.44.4, +# so use that version while we look for a fix in the newer version. +PREFERRED_VERSION_wpewebkit ?= "2.44.4" + # There's a generic opencl-headers recipe in the thud branch of # meta-openembedded, but we should use the package provided by the imx-gpu-viv # recipe in case there are NXP-specific changes in it diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Build-fix-when-LAYER_BASED_SVG_ENGINE-is-off.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Build-fix-when-LAYER_BASED_SVG_ENGINE-is-off.patch new file mode 100644 index 000000000..dd401f68f --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-Build-fix-when-LAYER_BASED_SVG_ENGINE-is-off.patch @@ -0,0 +1,102 @@ +From: Takashi Komori +Date: Mon, 4 Mar 2024 18:52:40 -0800 +Subject: [PATCH] Build fix when LAYER_BASED_SVG_ENGINE is off + https://bugs.webkit.org/show_bug.cgi?id=270213 + +Reviewed by Fujii Hironori. + +Build fix by checking LAYER_BASED_SVG_ENGINE option. + +* Source/WebCore/rendering/svg/RenderSVGResourceMarker.h: +* Source/WebCore/rendering/svg/RenderSVGResourceMasker.h: +* Source/WebCore/svg/SVGClipPathElement.cpp: +* Source/WebCore/svg/SVGMaskElement.cpp: + +Canonical link: https://commits.webkit.org/275668@main + +(cherry picked from commit 5651f991dcb7da30b961f3bbf70b5fc3c3954344) +--- + Source/WebCore/rendering/svg/RenderSVGResourceMarker.h | 4 ++++ + Source/WebCore/rendering/svg/RenderSVGResourceMasker.h | 4 ++++ + Source/WebCore/svg/SVGClipPathElement.cpp | 2 ++ + Source/WebCore/svg/SVGMaskElement.cpp | 2 ++ + 4 files changed, 12 insertions(+) + +diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h b/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h +index 8019b9049653..f3a1566a8419 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h ++++ b/Source/WebCore/rendering/svg/RenderSVGResourceMarker.h +@@ -23,6 +23,8 @@ + #include "RenderSVGResourceContainer.h" + #include "SVGMarkerTypes.h" + ++#if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + namespace WebCore { + + class GraphicsContext; +@@ -76,3 +78,5 @@ private: + } + + SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGResourceMarker, isRenderSVGResourceMarker()) ++ ++#endif // ENABLE(LAYER_BASED_SVG_ENGINE) +diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h b/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h +index fe868a49fc42..28777bb52631 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h ++++ b/Source/WebCore/rendering/svg/RenderSVGResourceMasker.h +@@ -25,6 +25,8 @@ + + #include + ++#if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + namespace WebCore { + + class GraphicsContext; +@@ -54,3 +56,5 @@ private: + } + + SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSVGResourceMasker, isRenderSVGResourceMasker()) ++ ++#endif // ENABLE(LAYER_BASED_SVG_ENGINE) +diff --git a/Source/WebCore/svg/SVGClipPathElement.cpp b/Source/WebCore/svg/SVGClipPathElement.cpp +index 9f3d824d7287..d5651c014e3e 100644 +--- a/Source/WebCore/svg/SVGClipPathElement.cpp ++++ b/Source/WebCore/svg/SVGClipPathElement.cpp +@@ -169,6 +169,7 @@ SVGGraphicsElement* SVGClipPathElement::shouldApplyPathClipping() const + FloatRect SVGClipPathElement::calculateClipContentRepaintRect(RepaintRectCalculation repaintRectCalculation) + { + ASSERT(renderer()); ++#if ENABLE(LAYER_BASED_SVG_ENGINE) + auto transformationMatrixFromChild = [&](const RenderLayerModelObject& child) -> std::optional { + if (!document().settings().layerBasedSVGEngineEnabled()) + return std::nullopt; +@@ -182,6 +183,7 @@ FloatRect SVGClipPathElement::calculateClipContentRepaintRect(RepaintRectCalcula + auto transform = SVGLayerTransformComputation(child).computeAccumulatedTransform(downcast(renderer()), TransformState::TrackSVGCTMMatrix); + return transform.isIdentity() ? std::nullopt : std::make_optional(WTFMove(transform)); + }; ++#endif + + FloatRect clipContentRepaintRect; + // This is a rough heuristic to appraise the clip size and doesn't consider clip on clip. +diff --git a/Source/WebCore/svg/SVGMaskElement.cpp b/Source/WebCore/svg/SVGMaskElement.cpp +index f622b955da14..c9a1c31c0572 100644 +--- a/Source/WebCore/svg/SVGMaskElement.cpp ++++ b/Source/WebCore/svg/SVGMaskElement.cpp +@@ -159,6 +159,7 @@ RenderPtr SVGMaskElement::createElementRenderer(RenderStyle&& sty + FloatRect SVGMaskElement::calculateMaskContentRepaintRect(RepaintRectCalculation repaintRectCalculation) + { + ASSERT(renderer()); ++#if ENABLE(LAYER_BASED_SVG_ENGINE) + auto transformationMatrixFromChild = [&](const RenderLayerModelObject& child) -> std::optional { + if (!document().settings().layerBasedSVGEngineEnabled()) + return std::nullopt; +@@ -172,6 +173,7 @@ FloatRect SVGMaskElement::calculateMaskContentRepaintRect(RepaintRectCalculation + auto transform = SVGLayerTransformComputation(child).computeAccumulatedTransform(downcast(renderer()), TransformState::TrackSVGCTMMatrix); + return transform.isIdentity() ? std::nullopt : std::make_optional(WTFMove(transform)); + }; ++#endif + FloatRect maskRepaintRect; + for (auto* childNode = firstChild(); childNode; childNode = childNode->nextSibling()) { + auto* renderer = childNode->renderer(); diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-DMABufVideoSinkGStreamer-disable-sink-unconditionall.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-DMABufVideoSinkGStreamer-disable-sink-unconditionall.patch new file mode 100644 index 000000000..ba25acc04 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit/0001-DMABufVideoSinkGStreamer-disable-sink-unconditionall.patch @@ -0,0 +1,44 @@ +From: Gabriel Valcazar +Date: Thu, 13 Feb 2025 11:35:27 +0100 +Subject: [PATCH] DMABufVideoSinkGStreamer: disable sink unconditionally + +The i.MX8X's VPU requires the use of the imxvideoconvert_g2d gstreamer plugin, +which is only available in GLVideoSinkGStreamer. The DMABuf sink has always +taken precedence over the GL one, but it used to be disabled by default. Now, +it's enabled by default and can only be disabled via an environment variable, +breaking video playback on the i.MX8X. + +Change this logic so that the GL sink is always used instead of the DMABuf one. + +Signed-off-by: Gabriel Valcazar +--- + .../gstreamer/DMABufVideoSinkGStreamer.cpp | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +diff --git a/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp +index 4c0415d35e18..a367f029495e 100644 +--- a/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp ++++ b/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp +@@ -175,21 +175,7 @@ static void webkit_dmabuf_video_sink_class_init(WebKitDMABufVideoSinkClass* klas + + bool webKitDMABufVideoSinkIsEnabled() + { +- static bool s_disabled = false; +-#if USE(GBM) +- static std::once_flag s_flag; +- std::call_once(s_flag, [&] { +- const char* value = g_getenv("WEBKIT_GST_DMABUF_SINK_DISABLED"); +- s_disabled = value && (equalLettersIgnoringASCIICase(value, "true"_s) || equalLettersIgnoringASCIICase(value, "1"_s)); +- if (!s_disabled && !GBMDevice::singleton().device()) { +- WTFLogAlways("Unable to access the GBM device, disabling DMABuf video sink."); +- s_disabled = true; +- } +- }); +-#else +- s_disabled = true; +-#endif +- return !s_disabled; ++ return false; + } + + bool webKitDMABufVideoSinkProbePlatform() diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.44.4.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.44.4.bbappend new file mode 100644 index 000000000..4b353af60 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/wpewebkit/wpewebkit_2.44.4.bbappend @@ -0,0 +1,11 @@ +# Copyright (C) 2025, Digi International Inc. +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +# Backport patch to fix build with "lbse" disabled +SRC_URI:append = " \ + file://0001-Build-fix-when-LAYER_BASED_SVG_ENGINE-is-off.patch \ +" + +SRC_URI:append:ccimx8x = " \ + file://0001-DMABufVideoSinkGStreamer-disable-sink-unconditionall.patch \ +"