| Index: Source/platform/graphics/filters/FilterEffect.cpp
|
| diff --git a/Source/platform/graphics/filters/FilterEffect.cpp b/Source/platform/graphics/filters/FilterEffect.cpp
|
| index 9ec5524bf1e511e8f3442aad82daae643f3a0bf0..6b81913c94583df6b12c024e6f621fab225e404f 100644
|
| --- a/Source/platform/graphics/filters/FilterEffect.cpp
|
| +++ b/Source/platform/graphics/filters/FilterEffect.cpp
|
| @@ -25,14 +25,13 @@
|
|
|
| #include "platform/graphics/filters/FilterEffect.h"
|
|
|
| +#if HAVE(ARM_NEON_INTRINSICS)
|
| +#include "platform/graphics/cpu/arm/filters/FilterEffectNEON.h"
|
| +#endif
|
| #include "platform/graphics/ImageBuffer.h"
|
| #include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
| #include "platform/graphics/filters/Filter.h"
|
|
|
| -#if HAVE(ARM_NEON_INTRINSICS)
|
| -#include <arm_neon.h>
|
| -#endif
|
| -
|
| namespace blink {
|
|
|
| static const float kMaxFilterArea = 4096 * 4096;
|
| @@ -220,22 +219,8 @@ void FilterEffect::forceValidPreMultipliedPixels()
|
| ASSERT(!(pixelArrayLength % 4));
|
|
|
| #if HAVE(ARM_NEON_INTRINSICS)
|
| - if (pixelArrayLength >= 64) {
|
| - unsigned char* lastPixel = pixelData + (pixelArrayLength & ~0x3f);
|
| - do {
|
| - // Increments pixelData by 64.
|
| - uint8x16x4_t sixteenPixels = vld4q_u8(pixelData);
|
| - sixteenPixels.val[0] = vminq_u8(sixteenPixels.val[0], sixteenPixels.val[3]);
|
| - sixteenPixels.val[1] = vminq_u8(sixteenPixels.val[1], sixteenPixels.val[3]);
|
| - sixteenPixels.val[2] = vminq_u8(sixteenPixels.val[2], sixteenPixels.val[3]);
|
| - vst4q_u8(pixelData, sixteenPixels);
|
| - pixelData += 64;
|
| - } while (pixelData < lastPixel);
|
| -
|
| - pixelArrayLength &= 0x3f;
|
| - if (!pixelArrayLength)
|
| - return;
|
| - }
|
| + if (hasCPUNEON())
|
| + pixelArrayLength = validPreMultipliedPixels64NEON(imageArray->length(), pixelData);
|
| #endif
|
|
|
| int numPixels = pixelArrayLength / 4;
|
|
|