diff mbox series

[scarthgap,2/2] webkitgtk: fix do_compile errors on beaglebone-yocto

Message ID 20240712052556.3982466-2-changqing.li@windriver.com
State Superseded
Delegated to: Steve Sakoman
Headers show
Series [scarthgap,1/2] webkitgtk: fix do_configure error on beaglebone-yocto | expand

Commit Message

Changqing Li July 12, 2024, 5:25 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

Backport 2 patches to fix following compile errors:
webkitgtk-2.44.1/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp:545:37: error: 'LS_POINT' was not declared in this scope; did you mean 'WebCore::LightType::LS_POINT'?
  545 |     if (data.lightSource->type() == LS_POINT) {
      |                                     ^~~~~~~~
      |                                     WebCore::LightType::LS_POINT

webkitgtk-2.44.1/Source/WebCore/platform/graphics/filters/FELighting.h:73:41: error: 'LightingData' does not name a type
   73 |     inline void platformApplyNeon(const LightingData&, const LightSource::PaintingData&);

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 ...fic-declarations-in-FELighting.h-unn.patch | 43 ++++++++++++
 ...icDowncast-adoption-in-platform-code.patch | 65 +++++++++++++++++++
 meta/recipes-sato/webkit/webkitgtk_2.44.1.bb  |  2 +
 3 files changed, 110 insertions(+)
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Remove-ARM-specific-declarations-in-FELighting.h-unn.patch
 create mode 100644 meta/recipes-sato/webkit/webkitgtk/0002-More-dynamicDowncast-adoption-in-platform-code.patch

Comments

patchtest@automation.yoctoproject.org July 12, 2024, 5:36 a.m. UTC | #1
Thank you for your submission. Patchtest identified one
or more issues with the patch. Please see the log below for
more information:

---
Testing patch /home/patchtest/share/mboxes/scarthgap-2-2-webkitgtk-fix-do_compile-errors-on-beaglebone-yocto.patch

FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: '0001-Remove-ARM-specific-declarations-in-FELighting.h-unn.patch' (test_patch.TestPatch.test_signed_off_by_presence)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this
email with an explanation of why the patch should be accepted. If you
believe these results are due to an error in patchtest, please submit a
bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category
under 'Yocto Project Subprojects'). For more information on specific
failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank
you!
diff mbox series

Patch

diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Remove-ARM-specific-declarations-in-FELighting.h-unn.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Remove-ARM-specific-declarations-in-FELighting.h-unn.patch
new file mode 100644
index 0000000000..1b457f7519
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0001-Remove-ARM-specific-declarations-in-FELighting.h-unn.patch
@@ -0,0 +1,43 @@ 
+From dbd1a59b239b3902e717fdeb063883dbb0b06ee9 Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Sun, 26 May 2024 14:24:35 -0700
+Subject: [PATCH 1/2] Remove ARM-specific declarations in FELighting.h unneeded
+ after 272873@main
+
+Unreviewed build fix.
+
+* Source/WebCore/platform/graphics/filters/FELighting.h: Remove unneeded
+  declarations for the getPowerCoefficients() and platformApplyNeon()
+  functions, which are now defined elsewhere; and were causing a build
+  failure due to usage of the protected LightingData type.
+
+Canonical link: https://commits.webkit.org/279334@main
+
+Backport this patch for fixing following compile error:
+webkitgtk-2.44.1/Source/WebCore/platform/graphics/filters/FELighting.h:73:41: error: 'LightingData' does not name a type 
+   73 |     inline void platformApplyNeon(const LightingData&, const LightSource::PaintingData&);
+
+Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/36d1b5d7c0ef9a733ee8055b1f35b1d24435d538]
+---
+ Source/WebCore/platform/graphics/filters/FELighting.h | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Source/WebCore/platform/graphics/filters/FELighting.h b/Source/WebCore/platform/graphics/filters/FELighting.h
+index 4efab920..dcd80b6f 100644
+--- a/Source/WebCore/platform/graphics/filters/FELighting.h
++++ b/Source/WebCore/platform/graphics/filters/FELighting.h
+@@ -68,11 +68,6 @@ protected:
+ 
+     std::unique_ptr<FilterEffectApplier> createSoftwareApplier() const override;
+ 
+-#if CPU(ARM_NEON) && CPU(ARM_TRADITIONAL) && COMPILER(GCC_COMPATIBLE)
+-    static int getPowerCoefficients(float exponent);
+-    inline void platformApplyNeon(const LightingData&, const LightSource::PaintingData&);
+-#endif
+-
+     Color m_lightingColor;
+     float m_surfaceScale;
+     float m_diffuseConstant;
+-- 
+2.25.1
+
diff --git a/meta/recipes-sato/webkit/webkitgtk/0002-More-dynamicDowncast-adoption-in-platform-code.patch b/meta/recipes-sato/webkit/webkitgtk/0002-More-dynamicDowncast-adoption-in-platform-code.patch
new file mode 100644
index 0000000000..a0c7b6bd57
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/0002-More-dynamicDowncast-adoption-in-platform-code.patch
@@ -0,0 +1,65 @@ 
+From 88fa4b49a10ecfb74c36c678c1e2b76136357153 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 12 Jul 2024 10:16:05 +0800
+Subject: [PATCH 2/2] More dynamicDowncast<> adoption in platform code
+
+Backport part of commit [90d13e7 More dynamicDowncast<> adoption in
+platform code] to fix following compile error for ARM_NEON:
+webkitgtk-2.44.1/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp:545:37: error: 'LS_POINT' was not declared in this scope; did you mean 'WebCore::LightType::LS_POINT'?
+  545 |     if (data.lightSource->type() == LS_POINT) {
+      |                                     ^~~~~~~~
+      |                                     WebCore::LightType::LS_POINT
+
+Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/90d13e77ab2192b7efa8e763eeb8b08dbbb6d5c3]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ .../filters/FELightingNeonParallelApplier.cpp | 22 +++++++++----------
+ 1 file changed, 10 insertions(+), 12 deletions(-)
+
+diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
+index 04d855fa..dccc003d 100644
+--- a/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
++++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNeonParallelApplier.cpp
+@@ -542,19 +542,17 @@ void FELightingNeonParallelApplier::applyPlatformParallel(const LightingData& da
+     floatArguments.colorBlue = color.blue;
+     floatArguments.padding4 = 0;
+ 
+-    if (data.lightSource->type() == LS_POINT) {
++    if (auto* pointLightSource = dynamicDowncast<PointLightSource>(*data.lightSource)) {
+         neonData.flags |= FLAG_POINT_LIGHT;
+-        auto& pointLightSource = downcast<PointLightSource>(*data.lightSource);
+-        floatArguments.lightX = pointLightSource.position().x();
+-        floatArguments.lightY = pointLightSource.position().y();
+-        floatArguments.lightZ = pointLightSource.position().z();
++        floatArguments.lightX = pointLightSource->position().x();
++        floatArguments.lightY = pointLightSource->position().y();
++        floatArguments.lightZ = pointLightSource->position().z();
+         floatArguments.padding2 = 0;
+-    } else if (data.lightSource->type() == LS_SPOT) {
++    } else if (auto* spotLightSource = dynamicDowncast<SpotLightSource>(*data.lightSource)) {
+         neonData.flags |= FLAG_SPOT_LIGHT;
+-        auto& spotLightSource = downcast<SpotLightSource>(*data.lightSource);
+-        floatArguments.lightX = spotLightSource.position().x();
+-        floatArguments.lightY = spotLightSource.position().y();
+-        floatArguments.lightZ = spotLightSource.position().z();
++        floatArguments.lightX = spotLightSource->position().x();
++        floatArguments.lightY = spotLightSource->position().y();
++        floatArguments.lightZ = spotLightSource->position().z();
+         floatArguments.padding2 = 0;
+ 
+         floatArguments.directionX = paintingData.directionVector.x();
+@@ -565,8 +563,8 @@ void FELightingNeonParallelApplier::applyPlatformParallel(const LightingData& da
+         floatArguments.coneCutOffLimit = paintingData.coneCutOffLimit;
+         floatArguments.coneFullLight = paintingData.coneFullLight;
+         floatArguments.coneCutOffRange = paintingData.coneCutOffLimit - paintingData.coneFullLight;
+-        neonData.coneExponent = getPowerCoefficients(spotLightSource.specularExponent());
+-        if (spotLightSource.specularExponent() == 1)
++        neonData.coneExponent = getPowerCoefficients(spotLightSource->specularExponent());
++        if (spotLightSource->specularExponent() == 1)
+             neonData.flags |= FLAG_CONE_EXPONENT_IS_1;
+     } else {
+         ASSERT(data.lightSource->type() == LS_DISTANT);
+-- 
+2.25.1
+
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb b/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb
index 14f7531549..c4a3c464c1 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.44.1.bb
@@ -16,6 +16,8 @@  SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
            file://no-musttail-arm.patch \
            file://t6-not-declared.patch \
            file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \
+           file://0001-Remove-ARM-specific-declarations-in-FELighting.h-unn.patch \
+           file://0002-More-dynamicDowncast-adoption-in-platform-code.patch \
            "
 SRC_URI[sha256sum] = "425b1459b0f04d0600c78d1abb5e7edfa3c060a420f8b231e9a6a2d5d29c5561"