Revert "SkNx basically always is fast now."
This reverts commit 21f7838296
.
Reason for revert: roll?
Original change's description:
> 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>
>
TBR=mtklein@chromium.org,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I0e57285c68eae0a64213fe29ea4cca5519777954
Reviewed-on: https://skia-review.googlesource.com/6040
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
bde5d5dc2e
commit
8ba64d1996
@ -23,6 +23,7 @@
|
||||
|
||||
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));
|
||||
}
|
||||
@ -31,6 +32,14 @@ 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 {
|
||||
|
@ -276,12 +276,15 @@ 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;
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
#define SKNX_IS_FAST
|
||||
|
||||
namespace {
|
||||
|
||||
// ARMv8 has vrndmq_f32 to floor 4 floats. Here we emulate it:
|
||||
|
@ -13,6 +13,8 @@
|
||||
// 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 <>
|
||||
|
Loading…
Reference in New Issue
Block a user