[WPE][GTK] Build error in ARMv7 Neon targets after r286152
https://bugs.webkit.org/show_bug.cgi?id=235410

Reviewed by Simon Fraser.

* platform/graphics/cpu/arm/filters/FEBlendNEON.h:
(WebCore::FEBlend::platformApplySoftware): Deleted.
* platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:
(WebCore::FEBlendSoftwareApplier::apply const):
* platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:
(WebCore::FECompositeSoftwareApplier::applyArithmetic const):
* platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@288559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 4094826..570a76c 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2022-01-25  Pablo Saavedra  <psaavedra@igalia.com>
+
+        [WPE][GTK] Build error in ARMv7 Neon targets after r286152
+        https://bugs.webkit.org/show_bug.cgi?id=235410
+
+        Reviewed by Simon Fraser.
+
+        * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
+        (WebCore::FEBlend::platformApplySoftware): Deleted.
+        * platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:
+        (WebCore::FEBlendSoftwareApplier::apply const):
+        * platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:
+        (WebCore::FECompositeSoftwareApplier::applyArithmetic const):
+        * platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:
+
 2022-01-25  Antti Koivisto  <antti@apple.com>
 
         [CSS Container Queries] Parsing support for container-name property
diff --git a/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h b/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h
index b52b8ac..ae7d98d 100644
--- a/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h
+++ b/Source/WebCore/platform/graphics/cpu/arm/filters/FEBlendNEON.h
@@ -106,42 +106,6 @@
     }
 };
 
-bool FEBlend::platformApplySoftware(const Filter&)
-{
-    FilterEffect* in = inputEffect(0);
-    FilterEffect* in2 = inputEffect(1);
-
-    auto& destinationPixelBuffer = pixelBufferResult(AlphaPremultiplication::Premultiplied);
-    if (!destinationPixelBuffer)
-        return false;
-
-    auto& destinationPixelArray = destinationPixelBuffer->data();
-
-    IntRect effectADrawingRect = requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    auto sourcePixelArrayA = in->getPixelBufferResult(AlphaPremultiplication::Premultiplied, effectADrawingRect);
-
-    IntRect effectBDrawingRect = requestedRegionOfInputPixelBuffer(in2->absolutePaintRect());
-    auto sourcePixelArrayB = in2->getPixelBufferResult(AlphaPremultiplication::Premultiplied, effectBDrawingRect);
-
-    unsigned sourcePixelArrayLength = sourcePixelArrayA->length();
-    ASSERT(pixelArrayLength == sourcePixelArrayB->length());
-
-    if (sourcePixelArrayLength >= 8) {
-        platformApplyNEON(sourcePixelArrayA->data(), sourcePixelArrayB->data(), destinationPixelArray.data(), sourcePixelArrayLength);
-        return true;
-    }
-    // If there is just one pixel we expand it to two.
-    ASSERT(sourcePixelArrayLength > 0);
-    uint32_t sourceA[2] = {0, 0};
-    uint32_t sourceBAndDest[2] = {0, 0};
-
-    sourceA[0] = reinterpret_cast<uint32_t*>(sourcePixelArrayA->data())[0];
-    sourceBAndDest[0] = reinterpret_cast<uint32_t*>(sourcePixelArrayB->data())[0];
-    platformApplyNEON(reinterpret_cast<uint8_t*>(sourceA), reinterpret_cast<uint8_t*>(sourceBAndDest), reinterpret_cast<uint8_t*>(sourceBAndDest), 8);
-    reinterpret_cast<uint32_t*>(destinationPixelArray.data())[0] = sourceBAndDest[0];
-    return true;
-}
-
 void FEBlend::platformApplyNEON(unsigned char* srcPixelArrayA, unsigned char* srcPixelArrayB, unsigned char* dstPixelArray,
                                 unsigned colorArrayLength)
 {
diff --git a/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp b/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp
index 53d5afc..0702cd4 100644
--- a/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp
+++ b/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp
@@ -33,7 +33,6 @@
 
 namespace WebCore {
 
-#if !HAVE(ARM_NEON_INTRINSICS)
 bool FEBlendSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) const
 {
     auto& input = inputs[0].get();
@@ -56,6 +55,5 @@
     filterContext.drawImageBuffer(*inputImage, inputImageRect, { { }, inputImage->logicalSize() }, { CompositeOperator::SourceOver, m_effect.blendMode() });
     return true;
 }
-#endif
 
 } // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp b/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp
index 292cef7..28a16ce 100644
--- a/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp
+++ b/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp
@@ -145,7 +145,9 @@
 
     int length = sourcePixelArray.length();
     ASSERT(length == static_cast<int>(destinationPixelArray.length()));
+#if !HAVE(ARM_NEON_INTRINSICS)
     applyPlatformArithmetic(sourcePixelArray.data(), destinationPixelArray.data(), length, m_effect.k1(), m_effect.k2(), m_effect.k3(), m_effect.k4());
+#endif
     return true;
 }
 
diff --git a/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp b/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp
index f6a9399..dee0480 100644
--- a/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp
+++ b/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp
@@ -27,6 +27,9 @@
 #include "FEGaussianBlurSoftwareApplier.h"
 
 #include "FEGaussianBlur.h"
+#if HAVE(ARM_NEON_INTRINSICS)
+#include "FEGaussianBlurNEON.h"
+#endif
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
 #include "PixelBuffer.h"