SkNx basically always is fast now.

We had this SKNX_IS_FAST hanging around from before Chrome always built with NEON.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ia5cc0323b3ef052192e2903f961aee11eb3f82d8
Reviewed-on: https://skia-review.googlesource.com/5946
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Mike Klein 2016-12-13 16:28:09 -05:00 committed by Skia Commit-Bot
parent 398487a850
commit 21f7838296
4 changed files with 0 additions and 16 deletions

View File

@ -23,7 +23,6 @@
struct ColorTypeFilter_8888 {
typedef uint32_t Type;
#if defined(SKNX_IS_FAST)
static Sk4h Expand(uint32_t x) {
return SkNx_cast<uint16_t>(Sk4b::Load(&x));
}
@ -32,14 +31,6 @@ struct ColorTypeFilter_8888 {
SkNx_cast<uint8_t>(x).store(&r);
return r;
}
#else
static uint64_t Expand(uint32_t x) {
return (x & 0xFF00FF) | ((uint64_t)(x & 0xFF00FF00) << 24);
}
static uint32_t Compact(uint64_t x) {
return (uint32_t)((x & 0xFF00FF) | ((x >> 24) & 0xFF00FF00));
}
#endif
};
struct ColorTypeFilter_S32 {

View File

@ -276,15 +276,12 @@ void SkLinearGradient::LinearGradientContext::shadeSpan(int x, int y, SkPMColor*
SkASSERT(count > 0);
const SkLinearGradient& linearGradient = static_cast<const SkLinearGradient&>(fShader);
// Only use the Sk4f impl when known to be fast.
#if defined(SKNX_IS_FAST)
if (SkShader::kClamp_TileMode == linearGradient.fTileMode &&
kLinear_MatrixClass == fDstToIndexClass)
{
this->shade4_clamp(x, y, dstC, count);
return;
}
#endif
SkPoint srcPt;
SkMatrix::MapXYProc dstProc = fDstToIndexProc;

View File

@ -10,8 +10,6 @@
#include <arm_neon.h>
#define SKNX_IS_FAST
namespace {
// ARMv8 has vrndmq_f32 to floor 4 floats. Here we emulate it:

View File

@ -13,8 +13,6 @@
// This file may assume <= SSE2, but must check SK_CPU_SSE_LEVEL for anything more recent.
// If you do, make sure this is in a static inline function... anywhere else risks violating ODR.
#define SKNX_IS_FAST
namespace {
template <>