| Index: src/core/SkMipMap.cpp
|
| diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp
|
| index 14e87a33a3ba996e362dc1ed3cba6c164d08b5cf..d468507ac76aae5eab0b5a2e971e1722f6ae2655 100644
|
| --- a/src/core/SkMipMap.cpp
|
| +++ b/src/core/SkMipMap.cpp
|
| @@ -8,7 +8,6 @@
|
| #include "SkMipMap.h"
|
| #include "SkBitmap.h"
|
| #include "SkColorPriv.h"
|
| -#include "SkNx.h"
|
|
|
| //
|
| // ColorTypeFilter is the "Type" we pass to some downsample template functions.
|
| @@ -19,23 +18,12 @@
|
|
|
| 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((const uint8_t*)&x));
|
| - }
|
| - static uint32_t Compact(const Sk4h& x) {
|
| - uint32_t r;
|
| - SkNx_cast<uint8_t>(x).store((uint8_t*)&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_565 {
|
| @@ -68,7 +56,7 @@
|
| }
|
| };
|
|
|
| -template <typename T> T add_121(const T& a, const T& b, const T& c) {
|
| +template <typename T> T add_121(T a, T b, T c) {
|
| return a + b + b + c;
|
| }
|
|
|
| @@ -105,7 +93,7 @@
|
| auto p0 = static_cast<const typename F::Type*>(src);
|
| auto p1 = (const typename F::Type*)((const char*)p0 + srcRB);
|
| auto d = static_cast<typename F::Type*>(dst);
|
| -
|
| +
|
| auto c02 = F::Expand(p0[0]);
|
| auto c12 = F::Expand(p1[0]);
|
| for (int i = 0; i < count; ++i) {
|
| @@ -128,7 +116,7 @@
|
| auto p1 = (const typename F::Type*)((const char*)p0 + srcRB);
|
| auto p2 = (const typename F::Type*)((const char*)p1 + srcRB);
|
| auto d = static_cast<typename F::Type*>(dst);
|
| -
|
| +
|
| for (int i = 0; i < count; ++i) {
|
| auto c00 = F::Expand(p0[0]);
|
| auto c01 = F::Expand(p0[1]);
|
|
|