remove shadeSpan16 from shader

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556003003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1556003003
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 97160a4..4d3ac5c 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -72,31 +72,14 @@
 
     enum Flags {
         //!< set if all of the colors will be opaque
-        kOpaqueAlpha_Flag  = 0x01,
-
-        //! set if this shader's shadeSpan16() method can be called
-        kHasSpan16_Flag = 0x02,
-
-        /** Set this bit if the shader's native data type is instrinsically 16
-            bit, meaning that calling the 32bit shadeSpan() entry point will
-            mean the the impl has to up-sample 16bit data into 32bit. Used as a
-            a means of clearing a dither request if the it will have no effect
-        */
-        kIntrinsicly16_Flag = 0x04,
+        kOpaqueAlpha_Flag = 1 << 0,
 
         /** set if the spans only vary in X (const in Y).
             e.g. an Nx1 bitmap that is being tiled in Y, or a linear-gradient
             that varies from left-to-right. This flag specifies this for
             shadeSpan().
          */
-        kConstInY32_Flag = 0x08,
-
-        /** same as kConstInY32_Flag, but is set if this is true for shadeSpan16
-            which may not always be the case, since shadeSpan16 may be
-            predithered, which would mean it was not const in Y, even though
-            the 32bit shadeSpan() would be const.
-         */
-        kConstInY16_Flag = 0x10
+        kConstInY32_Flag = 1 << 1,
     };
 
     /**
@@ -137,12 +120,6 @@
         virtual uint32_t getFlags() const { return 0; }
 
         /**
-         *  Return the alpha associated with the data returned by shadeSpan16(). If
-         *  kHasSpan16_Flag is not set, this value is meaningless.
-         */
-        virtual uint8_t getSpan16Alpha() const { return fPaintAlpha; }
-
-        /**
          *  Called for each span of the object being drawn. Your subclass should
          *  set the appropriate colors (with premultiplied alpha) that correspond
          *  to the specified device coordinates.
@@ -157,26 +134,12 @@
         virtual ShadeProc asAShadeProc(void** ctx);
 
         /**
-         *  Called only for 16bit devices when getFlags() returns
-         *  kOpaqueAlphaFlag | kHasSpan16_Flag
-         */
-        virtual void shadeSpan16(int x, int y, uint16_t[], int count);
-
-        /**
          *  Similar to shadeSpan, but only returns the alpha-channel for a span.
          *  The default implementation calls shadeSpan() and then extracts the alpha
          *  values from the returned colors.
          */
         virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count);
 
-        /**
-         *  Helper function that returns true if this shader's shadeSpan16() method
-         *  can be called.
-         */
-        bool canCallShadeSpan16() {
-            return SkShader::CanCallShadeSpan16(this->getFlags());
-        }
-
         // Notification from blitter::blitMask in case we need to see the non-alpha channels
         virtual void set3DMask(const SkMask*) {}
 
@@ -220,13 +183,6 @@
     virtual size_t contextSize() const;
 
     /**
-     *  Helper to check the flags to know if it is legal to call shadeSpan16()
-     */
-    static bool CanCallShadeSpan16(uint32_t flags) {
-        return (flags & kHasSpan16_Flag) != 0;
-    }
-
-    /**
      *  Returns true if this shader is just a bitmap, and if not null, returns the bitmap,
      *  localMatrix, and tilemodes. If this is not a bitmap, returns false and ignores the
      *  out-parameters.
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 6c9410e..e5b577a 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -68,11 +68,6 @@
     buffer.writeUInt(fTileModeY);
 }
 
-static bool only_scale_and_translate(const SkMatrix& matrix) {
-    unsigned mask = SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask;
-    return (matrix.getType() & ~mask) == 0;
-}
-
 bool SkBitmapProcShader::isOpaque() const {
     return fRawBitmap.isOpaque();
 }
@@ -110,47 +105,10 @@
     : INHERITED(shader, rec)
     , fState(state)
 {
-    const SkPixmap& pixmap = fState->fPixmap;
-    bool isOpaque = pixmap.isOpaque();
-
-    // update fFlags
-    uint32_t flags = 0;
-    if (isOpaque && (255 == this->getPaintAlpha())) {
-        flags |= kOpaqueAlpha_Flag;
+    fFlags = 0;
+    if (fState->fPixmap.isOpaque() && (255 == this->getPaintAlpha())) {
+        fFlags |= kOpaqueAlpha_Flag;
     }
-
-    switch (pixmap.colorType()) {
-        case kRGB_565_SkColorType:
-            flags |= (kHasSpan16_Flag | kIntrinsicly16_Flag);
-            break;
-        case kIndex_8_SkColorType:
-        case kN32_SkColorType:
-            if (isOpaque) {
-                flags |= kHasSpan16_Flag;
-            }
-            break;
-        case kAlpha_8_SkColorType:
-            break;  // never set kHasSpan16_Flag
-        default:
-            break;
-    }
-
-    if (rec.fPaint->isDither() && pixmap.colorType() != kRGB_565_SkColorType) {
-        // gradients can auto-dither in their 16bit sampler, but we don't so
-        // we clear the flag here.
-        flags &= ~kHasSpan16_Flag;
-    }
-
-    // if we're only 1-pixel high, and we don't rotate, then we can claim this
-    if (1 == pixmap.height() &&
-            only_scale_and_translate(this->getTotalInverse())) {
-        flags |= kConstInY32_Flag;
-        if (flags & kHasSpan16_Flag) {
-            flags |= kConstInY16_Flag;
-        }
-    }
-
-    fFlags = flags;
 }
 
 SkBitmapProcShader::BitmapProcShaderContext::~BitmapProcShaderContext() {
@@ -221,37 +179,6 @@
     return nullptr;
 }
 
-void SkBitmapProcShader::BitmapProcShaderContext::shadeSpan16(int x, int y, uint16_t dstC[],
-                                                              int count) {
-    const SkBitmapProcState& state = *fState;
-    if (state.getShaderProc16()) {
-        state.getShaderProc16()(&state, x, y, dstC, count);
-        return;
-    }
-
-    uint32_t buffer[BUF_MAX];
-    SkBitmapProcState::MatrixProc   mproc = state.getMatrixProc();
-    SkBitmapProcState::SampleProc16 sproc = state.getSampleProc16();
-    int max = state.maxCountForBufferSize(sizeof(buffer));
-
-    SkASSERT(state.fPixmap.addr());
-
-    for (;;) {
-        int n = count;
-        if (n > max) {
-            n = max;
-        }
-        mproc(state, buffer, n, x, y);
-        sproc(state, buffer, n, dstC);
-
-        if ((count -= n) == 0) {
-            break;
-        }
-        x += n;
-        dstC += n;
-    }
-}
-
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "SkUnPreMultiply.h"
diff --git a/src/core/SkBitmapProcShader.h b/src/core/SkBitmapProcShader.h
index b69b028..0346eff 100644
--- a/src/core/SkBitmapProcShader.h
+++ b/src/core/SkBitmapProcShader.h
@@ -43,7 +43,6 @@
 
         void shadeSpan(int x, int y, SkPMColor dstC[], int count) override;
         ShadeProc asAShadeProc(void** ctx) override;
-        void shadeSpan16(int x, int y, uint16_t dstC[], int count) override;
 
         uint32_t getFlags() const override { return fFlags; }
 
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index d18dfb5..b1438cb 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -21,7 +21,6 @@
 
 #if !SK_ARM_NEON_IS_NONE
 // These are defined in src/opts/SkBitmapProcState_arm_neon.cpp
-extern const SkBitmapProcState::SampleProc16 gSkBitmapProcStateSample16_neon[];
 extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[];
 extern void  S16_D16_filter_DX_neon(const SkBitmapProcState&, const uint32_t*, int, uint16_t*);
 extern void  Clamp_S16_D16_filter_DX_shaderproc_neon(const void *, int, int, uint16_t*, int);
@@ -193,7 +192,6 @@
     fShaderProc32 = nullptr;
     fShaderProc16 = nullptr;
     fSampleProc32 = nullptr;
-    fSampleProc16 = nullptr;
 
     // recompute the triviality of the matrix here because we may have
     // changed it!
@@ -336,45 +334,13 @@
             SG8_alpha_D32_filter_DX,
             SG8_alpha_D32_filter_DX
         };
-
-        static const SampleProc16 gSkBitmapProcStateSample16[] = {
-            S32_D16_nofilter_DXDY,
-            S32_D16_nofilter_DX,
-            S32_D16_filter_DXDY,
-            S32_D16_filter_DX,
-
-            S16_D16_nofilter_DXDY,
-            S16_D16_nofilter_DX,
-            S16_D16_filter_DXDY,
-            S16_D16_filter_DX,
-
-            SI8_D16_nofilter_DXDY,
-            SI8_D16_nofilter_DX,
-            SI8_D16_filter_DXDY,
-            SI8_D16_filter_DX,
-
-            // Don't support 4444 -> 565
-            nullptr, nullptr, nullptr, nullptr,
-            // Don't support A8 -> 565
-            nullptr, nullptr, nullptr, nullptr,
-            // Don't support G8 -> 565 (but we could)
-            nullptr, nullptr, nullptr, nullptr
-        };
 #endif
 
         fSampleProc32 = SK_ARM_NEON_WRAP(gSkBitmapProcStateSample32)[index];
         index >>= 1;    // shift away any opaque/alpha distinction
-        fSampleProc16 = SK_ARM_NEON_WRAP(gSkBitmapProcStateSample16)[index];
 
         // our special-case shaderprocs
-        if (SK_ARM_NEON_WRAP(S16_D16_filter_DX) == fSampleProc16) {
-            if (clampClamp) {
-                fShaderProc16 = SK_ARM_NEON_WRAP(Clamp_S16_D16_filter_DX_shaderproc);
-            } else if (SkShader::kRepeat_TileMode == fTileModeX &&
-                       SkShader::kRepeat_TileMode == fTileModeY) {
-                fShaderProc16 = SK_ARM_NEON_WRAP(Repeat_S16_D16_filter_DX_shaderproc);
-            }
-        } else if (SK_ARM_NEON_WRAP(SI8_opaque_D32_filter_DX) == fSampleProc32 && clampClamp) {
+        if (SK_ARM_NEON_WRAP(SI8_opaque_D32_filter_DX) == fSampleProc32 && clampClamp) {
             fShaderProc32 = SK_ARM_NEON_WRAP(Clamp_SI8_opaque_D32_filter_DX_shaderproc);
         } else if (S32_opaque_D32_nofilter_DX == fSampleProc32 && clampClamp) {
             fShaderProc32 = Clamp_S32_opaque_D32_nofilter_DX_shaderproc;
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h
index 24c6db6..34f70c5 100644
--- a/src/core/SkBitmapProcState.h
+++ b/src/core/SkBitmapProcState.h
@@ -46,11 +46,6 @@
                                  int count,
                                  SkPMColor colors[]);
 
-    typedef void (*SampleProc16)(const SkBitmapProcState&,
-                                 const uint32_t[],
-                                 int count,
-                                 uint16_t colors[]);
-
     typedef U16CPU (*FixedTileProc)(SkFixed);   // returns 0..0xFFFF
     typedef U16CPU (*FixedTileLowBitsProc)(SkFixed, int);   // returns 0..0xF
     typedef U16CPU (*IntTileProc)(int value, int count);   // returns 0..count-1
@@ -117,7 +112,6 @@
     MatrixProc getMatrixProc() const { return fMatrixProc; }
 #endif
     SampleProc32 getSampleProc32() const { return fSampleProc32; }
-    SampleProc16 getSampleProc16() const { return fSampleProc16; }
 
 private:
     friend class SkBitmapProcShader;
@@ -128,7 +122,6 @@
     // These are used if the shaderproc is nullptr
     MatrixProc          fMatrixProc;        // chooseProcs
     SampleProc32        fSampleProc32;      // chooseProcs
-    SampleProc16        fSampleProc16;      // chooseProcs
 
     const SkBitmapProvider fProvider;
 
diff --git a/src/core/SkBitmapProcState_procs.h b/src/core/SkBitmapProcState_procs.h
index 03e1927..cec079e 100644
--- a/src/core/SkBitmapProcState_procs.h
+++ b/src/core/SkBitmapProcState_procs.h
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2011 Google Inc.
  *
@@ -88,7 +87,6 @@
 #define FILTER_PROC(x, y, a, b, c, d, dst)   NAME_WRAP(Filter_32_opaque)(x, y, a, b, c, d, dst)
 
 #define MAKENAME(suffix)        NAME_WRAP(S32_opaque_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 SkPMColor
 #define CHECKSTATE(state)       SkASSERT(4 == state.fPixmap.info().bytesPerPixel()); \
                                 SkASSERT(state.fAlphaScale == 256)
@@ -100,7 +98,6 @@
 #define FILTER_PROC(x, y, a, b, c, d, dst)   NAME_WRAP(Filter_32_alpha)(x, y, a, b, c, d, dst, alphaScale)
 
 #define MAKENAME(suffix)        NAME_WRAP(S32_alpha_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 SkPMColor
 #define CHECKSTATE(state)       SkASSERT(4 == state.fPixmap.info().bytesPerPixel()); \
                                 SkASSERT(state.fAlphaScale < 256)
@@ -119,7 +116,6 @@
     } while (0)
 
 #define MAKENAME(suffix)        NAME_WRAP(S16_opaque_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 uint16_t
 #define CHECKSTATE(state)       SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType()); \
                                 SkASSERT(state.fAlphaScale == 256)
@@ -135,7 +131,6 @@
     } while (0)
 
 #define MAKENAME(suffix)        NAME_WRAP(S16_alpha_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 uint16_t
 #define CHECKSTATE(state)       SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType()); \
                                 SkASSERT(state.fAlphaScale < 256)
@@ -150,7 +145,6 @@
 #define FILTER_PROC(x, y, a, b, c, d, dst)   NAME_WRAP(Filter_32_opaque)(x, y, a, b, c, d, dst)
 
 #define MAKENAME(suffix)        NAME_WRAP(SI8_opaque_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 uint8_t
 #define CHECKSTATE(state)       SkASSERT(kIndex_8_SkColorType == state.fPixmap.colorType()); \
                                 SkASSERT(state.fAlphaScale == 256)
@@ -164,7 +158,6 @@
 #define FILTER_PROC(x, y, a, b, c, d, dst)   NAME_WRAP(Filter_32_alpha)(x, y, a, b, c, d, dst, alphaScale)
 
 #define MAKENAME(suffix)        NAME_WRAP(SI8_alpha_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 uint8_t
 #define CHECKSTATE(state)       SkASSERT(kIndex_8_SkColorType == state.fPixmap.colorType()); \
                                 SkASSERT(state.fAlphaScale < 256)
@@ -181,7 +174,6 @@
 #define FILTER_PROC(x, y, a, b, c, d, dst)  *(dst) = Filter_4444_D32(x, y, a, b, c, d)
 
 #define MAKENAME(suffix)        NAME_WRAP(S4444_opaque_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 SkPMColor16
 #define CHECKSTATE(state)       SkASSERT(kARGB_4444_SkColorType == state.fPixmap.colorType()); \
                                 SkASSERT(state.fAlphaScale == 256)
@@ -197,7 +189,6 @@
     } while (0)
 
 #define MAKENAME(suffix)        NAME_WRAP(S4444_alpha_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 SkPMColor16
 #define CHECKSTATE(state)       SkASSERT(kARGB_4444_SkColorType == state.fPixmap.colorType()); \
                                 SkASSERT(state.fAlphaScale < 256)
@@ -216,7 +207,6 @@
     } while (0)
 
 #define MAKENAME(suffix)        NAME_WRAP(SA8_alpha_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 uint8_t
 #define CHECKSTATE(state)       SkASSERT(kAlpha_8_SkColorType == state.fPixmap.colorType());
 #define PREAMBLE(state)         const SkPMColor pmColor = state.fPaintPMColor;
@@ -235,7 +225,6 @@
     } while (0)
 
 #define MAKENAME(suffix)        NAME_WRAP(SG8_alpha_D32 ## suffix)
-#define DSTSIZE                 32
 #define SRCTYPE                 uint8_t
 #define CHECKSTATE(state)       SkASSERT(kGray_8_SkColorType == state.fPixmap.colorType());
 #define PREAMBLE(state)         unsigned alphaScale = state.fAlphaScale
@@ -243,105 +232,6 @@
 #define SRC_TO_FILTER(src)      src
 #include "SkBitmapProcState_sample.h"
 
-/*****************************************************************************
- *
- *  D16 functions
- *
- */
-
-// SRC == 8888
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
-    do {                                                \
-        SkPMColor dstColor;                             \
-        NAME_WRAP(Filter_32_opaque)(x, y, a, b, c, d, &dstColor);  \
-        (*dst) = SkPixel32ToPixel16(dstColor);          \
-    } while (0)
-
-#define MAKENAME(suffix)        NAME_WRAP(S32_D16 ## suffix)
-#define DSTSIZE                 16
-#define SRCTYPE                 SkPMColor
-#define CHECKSTATE(state)       SkASSERT(4 == state.fPixmap.info().bytesPerPixel()); \
-                                SkASSERT(state.fPixmap.isOpaque())
-#define RETURNDST(src)          SkPixel32ToPixel16(src)
-#define SRC_TO_FILTER(src)      src
-#include "SkBitmapProcState_sample.h"
-
-// SRC == 565
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
-    do {                                                        \
-        uint32_t tmp = Filter_565_Expanded(x, y, a, b, c, d);   \
-        *(dst) = SkCompact_rgb_16((tmp) >> 5);                  \
-    } while (0)
-
-#define MAKENAME(suffix)        NAME_WRAP(S16_D16 ## suffix)
-#define DSTSIZE                 16
-#define SRCTYPE                 uint16_t
-#define CHECKSTATE(state)       SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType())
-#define RETURNDST(src)          src
-#define SRC_TO_FILTER(src)      src
-#include "SkBitmapProcState_sample.h"
-
-// SRC == Index8
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
-    do {                                                        \
-        uint32_t tmp = Filter_565_Expanded(x, y, a, b, c, d);   \
-        *(dst) = SkCompact_rgb_16((tmp) >> 5);                  \
-    } while (0)
-
-#define MAKENAME(suffix)        NAME_WRAP(SI8_D16 ## suffix)
-#define DSTSIZE                 16
-#define SRCTYPE                 uint8_t
-#define CHECKSTATE(state)       SkASSERT(kIndex_8_SkColorType == state.fPixmap.colorType()); \
-                                SkASSERT(state.fPixmap.isOpaque())
-#define PREAMBLE(state)         const uint16_t* SK_RESTRICT table = state.fPixmap.ctable()->read16BitCache()
-#define RETURNDST(src)          table[src]
-#define SRC_TO_FILTER(src)      table[src]
-#define POSTAMBLE(state)
-#include "SkBitmapProcState_sample.h"
-
-///////////////////////////////////////////////////////////////////////////////
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
-    do {                                                        \
-        uint32_t tmp = Filter_565_Expanded(x, y, a, b, c, d);   \
-        *(dst) = SkCompact_rgb_16((tmp) >> 5);                  \
-    } while (0)
-
-
-// clamp
-
-#define TILEX_PROCF(fx, max)    SkClampMax((fx) >> 16, max)
-#define TILEY_PROCF(fy, max)    SkClampMax((fy) >> 16, max)
-#define TILEX_LOW_BITS(fx, max) (((fx) >> 12) & 0xF)
-#define TILEY_LOW_BITS(fy, max) (((fy) >> 12) & 0xF)
-
-#define MAKENAME(suffix)        NAME_WRAP(Clamp_S16_D16 ## suffix)
-#define SRCTYPE                 uint16_t
-#define DSTTYPE                 uint16_t
-#define CHECKSTATE(state)       SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType())
-#define SRC_TO_FILTER(src)      src
-#include "SkBitmapProcState_shaderproc.h"
-
-
-#define TILEX_PROCF(fx, max)    (((fx) & 0xFFFF) * ((max) + 1) >> 16)
-#define TILEY_PROCF(fy, max)    (((fy) & 0xFFFF) * ((max) + 1) >> 16)
-#define TILEX_LOW_BITS(fx, max) ((((fx) & 0xFFFF) * ((max) + 1) >> 12) & 0xF)
-#define TILEY_LOW_BITS(fy, max) ((((fy) & 0xFFFF) * ((max) + 1) >> 12) & 0xF)
-
-#define MAKENAME(suffix)        NAME_WRAP(Repeat_S16_D16 ## suffix)
-#define SRCTYPE                 uint16_t
-#define DSTTYPE                 uint16_t
-#define CHECKSTATE(state)       SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType())
-#define SRC_TO_FILTER(src)      src
-#include "SkBitmapProcState_shaderproc.h"
-
 
 #define TILEX_PROCF(fx, max)    SkClampMax((fx) >> 16, max)
 #define TILEY_PROCF(fy, max)    SkClampMax((fy) >> 16, max)
@@ -352,7 +242,6 @@
 #define FILTER_PROC(x, y, a, b, c, d, dst)   NAME_WRAP(Filter_32_opaque)(x, y, a, b, c, d, dst)
 #define MAKENAME(suffix)        NAME_WRAP(Clamp_SI8_opaque_D32 ## suffix)
 #define SRCTYPE                 uint8_t
-#define DSTTYPE                 uint32_t
 #define CHECKSTATE(state)       SkASSERT(kIndex_8_SkColorType == state.fPixmap.colorType())
 #define PREAMBLE(state)         const SkPMColor* SK_RESTRICT table = state.fPixmap.ctable()->readColors()
 #define SRC_TO_FILTER(src)      table[src]
diff --git a/src/core/SkBitmapProcState_sample.h b/src/core/SkBitmapProcState_sample.h
index f70b758..4a02288 100644
--- a/src/core/SkBitmapProcState_sample.h
+++ b/src/core/SkBitmapProcState_sample.h
@@ -7,40 +7,23 @@
 
 #include "SkUtils.h"
 
-#if DSTSIZE==32
-    #define DSTTYPE SkPMColor
-#elif DSTSIZE==16
-    #define DSTTYPE uint16_t
-#else
-    #error "need DSTSIZE to be 32 or 16"
-#endif
-
-#if (DSTSIZE == 32)
-    #define BITMAPPROC_MEMSET(ptr, value, n) sk_memset32(ptr, value, n)
-#elif (DSTSIZE == 16)
-    #define BITMAPPROC_MEMSET(ptr, value, n) sk_memset16(ptr, value, n)
-#else
-    #error "unsupported DSTSIZE"
-#endif
-
-
 // declare functions externally to suppress warnings.
 void MAKENAME(_nofilter_DXDY)(const SkBitmapProcState& s,
                               const uint32_t* SK_RESTRICT xy,
-                              int count, DSTTYPE* SK_RESTRICT colors);
+                              int count, SkPMColor* SK_RESTRICT colors);
 void MAKENAME(_nofilter_DX)(const SkBitmapProcState& s,
                             const uint32_t* SK_RESTRICT xy,
-                            int count, DSTTYPE* SK_RESTRICT colors);
+                            int count, SkPMColor* SK_RESTRICT colors);
 void MAKENAME(_filter_DX)(const SkBitmapProcState& s,
                           const uint32_t* SK_RESTRICT xy,
-                           int count, DSTTYPE* SK_RESTRICT colors);
+                           int count, SkPMColor* SK_RESTRICT colors);
 void MAKENAME(_filter_DXDY)(const SkBitmapProcState& s,
                             const uint32_t* SK_RESTRICT xy,
-                            int count, DSTTYPE* SK_RESTRICT colors);
+                            int count, SkPMColor* SK_RESTRICT colors);
 
 void MAKENAME(_nofilter_DXDY)(const SkBitmapProcState& s,
                               const uint32_t* SK_RESTRICT xy,
-                              int count, DSTTYPE* SK_RESTRICT colors) {
+                              int count, SkPMColor* SK_RESTRICT colors) {
     SkASSERT(count > 0 && colors != nullptr);
     SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
     SkDEBUGCODE(CHECKSTATE(s);)
@@ -82,7 +65,7 @@
 
 void MAKENAME(_nofilter_DX)(const SkBitmapProcState& s,
                             const uint32_t* SK_RESTRICT xy,
-                            int count, DSTTYPE* SK_RESTRICT colors) {
+                            int count, SkPMColor* SK_RESTRICT colors) {
     SkASSERT(count > 0 && colors != nullptr);
     SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
     SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
@@ -104,8 +87,8 @@
 
     if (1 == s.fPixmap.width()) {
         src = srcAddr[0];
-        DSTTYPE dstValue = RETURNDST(src);
-        BITMAPPROC_MEMSET(colors, dstValue, count);
+        SkPMColor dstValue = RETURNDST(src);
+        sk_memset32(colors, dstValue, count);
     } else {
         int i;
         for (i = (count >> 2); i > 0; --i) {
@@ -137,7 +120,7 @@
 
 void MAKENAME(_filter_DX)(const SkBitmapProcState& s,
                           const uint32_t* SK_RESTRICT xy,
-                           int count, DSTTYPE* SK_RESTRICT colors) {
+                           int count, SkPMColor* SK_RESTRICT colors) {
     SkASSERT(count > 0 && colors != nullptr);
     SkASSERT(s.fFilterLevel != kNone_SkFilterQuality);
     SkDEBUGCODE(CHECKSTATE(s);)
@@ -183,7 +166,7 @@
 }
 void MAKENAME(_filter_DXDY)(const SkBitmapProcState& s,
                             const uint32_t* SK_RESTRICT xy,
-                            int count, DSTTYPE* SK_RESTRICT colors) {
+                            int count, SkPMColor* SK_RESTRICT colors) {
     SkASSERT(count > 0 && colors != nullptr);
     SkASSERT(s.fFilterLevel != kNone_SkFilterQuality);
     SkDEBUGCODE(CHECKSTATE(s);)
@@ -225,8 +208,6 @@
 }
 
 #undef MAKENAME
-#undef DSTSIZE
-#undef DSTTYPE
 #undef SRCTYPE
 #undef CHECKSTATE
 #undef RETURNDST
@@ -245,4 +226,3 @@
 #undef GET_FILTER_ROW
 #undef GET_FILTER_ROW_PROC
 #undef GET_FILTER_PROC
-#undef BITMAPPROC_MEMSET
diff --git a/src/core/SkBitmapProcState_shaderproc.h b/src/core/SkBitmapProcState_shaderproc.h
index b1fdc5f..d41ff06 100644
--- a/src/core/SkBitmapProcState_shaderproc.h
+++ b/src/core/SkBitmapProcState_shaderproc.h
@@ -1,4 +1,3 @@
-
 /*
  * Copyright 2011 Google Inc.
  *
@@ -12,11 +11,9 @@
 
 // Can't be static in the general case because some of these implementations
 // will be defined and referenced in different object files.
-void SCALE_FILTER_NAME(const void* sIn, int x, int y,
-                       DSTTYPE* SK_RESTRICT colors, int count);
+void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT colors, int count);
 
-void SCALE_FILTER_NAME(const void* sIn, int x, int y,
-                       DSTTYPE* SK_RESTRICT colors, int count) {
+void SCALE_FILTER_NAME(const void* sIn, int x, int y, SkPMColor* SK_RESTRICT colors, int count) {
     const SkBitmapProcState& s = *static_cast<const SkBitmapProcState*>(sIn);
     SkASSERT((s.fInvType & ~(SkMatrix::kTranslate_Mask |
                              SkMatrix::kScale_Mask)) == 0);
@@ -85,7 +82,6 @@
 #undef TILEY_LOW_BITS
 #undef MAKENAME
 #undef SRCTYPE
-#undef DSTTYPE
 #undef CHECKSTATE
 #undef SRC_TO_FILTER
 #undef FILTER_TO_DST
diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp
index 06dfeea..38edd60 100644
--- a/src/core/SkBlitter_RGB16.cpp
+++ b/src/core/SkBlitter_RGB16.cpp
@@ -134,20 +134,6 @@
     typedef SkShaderBlitter INHERITED;
 };
 
-// used only if the shader can perform shadSpan16
-class SkRGB16_Shader16_Blitter : public SkRGB16_Shader_Blitter {
-public:
-    SkRGB16_Shader16_Blitter(const SkPixmap& device, const SkPaint& paint,
-                             SkShader::Context* shaderContext);
-    void blitH(int x, int y, int width) override;
-    virtual void blitAntiH(int x, int y, const SkAlpha* antialias,
-                           const int16_t* runs) override;
-    void blitRect(int x, int y, int width, int height) override;
-
-private:
-    typedef SkRGB16_Shader_Blitter INHERITED;
-};
-
 class SkRGB16_Shader_Xfermode_Blitter : public SkShaderBlitter {
 public:
     SkRGB16_Shader_Xfermode_Blitter(const SkPixmap& device, const SkPaint& paint,
@@ -692,131 +678,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-SkRGB16_Shader16_Blitter::SkRGB16_Shader16_Blitter(const SkPixmap& device,
-                                                   const SkPaint& paint,
-                                                   SkShader::Context* shaderContext)
-    : SkRGB16_Shader_Blitter(device, paint, shaderContext)
-{
-    SkASSERT(SkShader::CanCallShadeSpan16(fShaderFlags));
-}
-
-void SkRGB16_Shader16_Blitter::blitH(int x, int y, int width) {
-    SkASSERT(x + width <= fDevice.width());
-
-    uint16_t* SK_RESTRICT device = fDevice.writable_addr16(x, y);
-    SkShader::Context*    shaderContext = fShaderContext;
-
-    int alpha = shaderContext->getSpan16Alpha();
-    if (0xFF == alpha) {
-        shaderContext->shadeSpan16(x, y, device, width);
-    } else {
-        uint16_t* span16 = (uint16_t*)fBuffer;
-        shaderContext->shadeSpan16(x, y, span16, width);
-        SkBlendRGB16(span16, device, SkAlpha255To256(alpha), width);
-    }
-}
-
-void SkRGB16_Shader16_Blitter::blitRect(int x, int y, int width, int height) {
-    SkShader::Context* shaderContext = fShaderContext;
-    uint16_t*          dst = fDevice.writable_addr16(x, y);
-    size_t             dstRB = fDevice.rowBytes();
-    int                alpha = shaderContext->getSpan16Alpha();
-
-    if (0xFF == alpha) {
-        if (fShaderFlags & SkShader::kConstInY16_Flag) {
-            // have the shader blit directly into the device the first time
-            shaderContext->shadeSpan16(x, y, dst, width);
-            // and now just memcpy that line on the subsequent lines
-            if (--height > 0) {
-                const uint16_t* orig = dst;
-                do {
-                    dst = (uint16_t*)((char*)dst + dstRB);
-                    memcpy(dst, orig, width << 1);
-                } while (--height);
-            }
-        } else {    // need to call shadeSpan16 for every line
-            do {
-                shaderContext->shadeSpan16(x, y, dst, width);
-                y += 1;
-                dst = (uint16_t*)((char*)dst + dstRB);
-            } while (--height);
-        }
-    } else {
-        int scale = SkAlpha255To256(alpha);
-        uint16_t* span16 = (uint16_t*)fBuffer;
-        if (fShaderFlags & SkShader::kConstInY16_Flag) {
-            shaderContext->shadeSpan16(x, y, span16, width);
-            do {
-                SkBlendRGB16(span16, dst, scale, width);
-                dst = (uint16_t*)((char*)dst + dstRB);
-            } while (--height);
-        } else {
-            do {
-                shaderContext->shadeSpan16(x, y, span16, width);
-                SkBlendRGB16(span16, dst, scale, width);
-                y += 1;
-                dst = (uint16_t*)((char*)dst + dstRB);
-            } while (--height);
-        }
-    }
-}
-
-void SkRGB16_Shader16_Blitter::blitAntiH(int x, int y,
-                                         const SkAlpha* SK_RESTRICT antialias,
-                                         const int16_t* SK_RESTRICT runs) {
-    SkShader::Context*     shaderContext = fShaderContext;
-    SkPMColor* SK_RESTRICT span = fBuffer;
-    uint16_t* SK_RESTRICT  device = fDevice.writable_addr16(x, y);
-
-    int alpha = shaderContext->getSpan16Alpha();
-    uint16_t* span16 = (uint16_t*)span;
-
-    if (0xFF == alpha) {
-        for (;;) {
-            int count = *runs;
-            if (count <= 0) {
-                break;
-            }
-            SkASSERT(count <= fDevice.width()); // don't overrun fBuffer
-
-            int aa = *antialias;
-            if (aa == 255) {
-                // go direct to the device!
-                shaderContext->shadeSpan16(x, y, device, count);
-            } else if (aa) {
-                shaderContext->shadeSpan16(x, y, span16, count);
-                SkBlendRGB16(span16, device, SkAlpha255To256(aa), count);
-            }
-            device += count;
-            runs += count;
-            antialias += count;
-            x += count;
-        }
-    } else {  // span alpha is < 255
-        alpha = SkAlpha255To256(alpha);
-        for (;;) {
-            int count = *runs;
-            if (count <= 0) {
-                break;
-            }
-            SkASSERT(count <= fDevice.width()); // don't overrun fBuffer
-
-            int aa = SkAlphaMul(*antialias, alpha);
-            if (aa) {
-                shaderContext->shadeSpan16(x, y, span16, count);
-                SkBlendRGB16(span16, device, SkAlpha255To256(aa), count);
-            }
-
-            device += count;
-            runs += count;
-            antialias += count;
-            x += count;
-        }
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
 SkRGB16_Shader_Blitter::SkRGB16_Shader_Blitter(const SkPixmap& device,
                                                const SkPaint& paint,
                                                SkShader::Context* shaderContext)
@@ -834,8 +695,7 @@
     if (!(shaderFlags & SkShader::kOpaqueAlpha_Flag)) {
         flags |= SkBlitRow::kSrcPixelAlpha_Flag;
     }
-    // don't dither if the shader is really 16bit
-    if (paint.isDither() && !(shaderFlags & SkShader::kIntrinsicly16_Flag)) {
+    if (paint.isDither()) {
         flags |= SkBlitRow::kDither_Flag;
     }
     // used when we know our global alpha is 0xFF
@@ -1047,8 +907,6 @@
         if (mode) {
             blitter = allocator->createT<SkRGB16_Shader_Xfermode_Blitter>(device, paint,
                                                                           shaderContext);
-        } else if (shaderContext->canCallShadeSpan16()) {
-            blitter = allocator->createT<SkRGB16_Shader16_Blitter>(device, paint, shaderContext);
         } else {
             blitter = allocator->createT<SkRGB16_Shader_Blitter>(device, paint, shaderContext);
         }
diff --git a/src/core/SkColorShader.h b/src/core/SkColorShader.h
index e3fddb2..25a1d6c 100644
--- a/src/core/SkColorShader.h
+++ b/src/core/SkColorShader.h
@@ -34,15 +34,12 @@
         ColorShaderContext(const SkColorShader& shader, const ContextRec&);
 
         uint32_t getFlags() const override;
-        uint8_t getSpan16Alpha() const override;
         void shadeSpan(int x, int y, SkPMColor span[], int count) override;
-        void shadeSpan16(int x, int y, uint16_t span[], int count) override;
         void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) override;
 
     private:
         SkPMColor   fPMColor;
         uint32_t    fFlags;
-        uint16_t    fColor16;
 
         typedef SkShader::Context INHERITED;
     };
diff --git a/src/core/SkFilterShader.cpp b/src/core/SkFilterShader.cpp
index b52c2be..2f07c23 100644
--- a/src/core/SkFilterShader.cpp
+++ b/src/core/SkFilterShader.cpp
@@ -46,9 +46,6 @@
     uint32_t shaderF = fShaderContext->getFlags();
     uint32_t filterF = filterShader.fFilter->getFlags();
 
-    // filters don't support 16bit, so clear the matching bit in the shader
-    shaderF &= ~SkShader::kHasSpan16_Flag;
-
     // if the filter might change alpha, clear the opaque flag in the shader
     if (!(filterF & SkColorFilter::kAlphaUnchanged_Flag)) {
         shaderF &= ~SkShader::kOpaqueAlpha_Flag;
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 0ec1433..bd3876a 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -119,15 +119,6 @@
 
 #include "SkColorPriv.h"
 
-void SkShader::Context::shadeSpan16(int x, int y, uint16_t span16[], int count) {
-    SkASSERT(span16);
-    SkASSERT(count > 0);
-    SkASSERT(this->canCallShadeSpan16());
-
-    // basically, if we get here, the subclass screwed up
-    SkDEBUGFAIL("kHasSpan16 flag is set, but shadeSpan16() not implemented");
-}
-
 #define kTempColorQuadCount 6   // balance between speed (larger) and saving stack-space
 #define kTempColorCount     (kTempColorQuadCount << 2)
 
@@ -266,10 +257,6 @@
     return fFlags;
 }
 
-uint8_t SkColorShader::ColorShaderContext::getSpan16Alpha() const {
-    return SkGetPackedA32(fPMColor);
-}
-
 SkShader::Context* SkColorShader::onCreateContext(const ContextRec& rec, void* storage) const {
     return new (storage) ColorShaderContext(*this, rec);
 }
@@ -285,9 +272,6 @@
     unsigned g = SkColorGetG(color);
     unsigned b = SkColorGetB(color);
 
-    // we want this before we apply any alpha
-    fColor16 = SkPack888ToRGB16(r, g, b);
-
     if (a != 255) {
         r = SkMulDiv255Round(r, a);
         g = SkMulDiv255Round(g, a);
@@ -298,9 +282,6 @@
     fFlags = kConstInY32_Flag;
     if (255 == a) {
         fFlags |= kOpaqueAlpha_Flag;
-        if (rec.fPaint->isDither() == false) {
-            fFlags |= kHasSpan16_Flag;
-        }
     }
 }
 
@@ -308,10 +289,6 @@
     sk_memset32(span, fPMColor, count);
 }
 
-void SkColorShader::ColorShaderContext::shadeSpan16(int x, int y, uint16_t span[], int count) {
-    sk_memset16(span, fColor16, count);
-}
-
 void SkColorShader::ColorShaderContext::shadeSpanAlpha(int x, int y, uint8_t alpha[], int count) {
     memset(alpha, SkGetPackedA32(fPMColor), count);
 }
diff --git a/src/opts/SkBitmapProcState_arm_neon.cpp b/src/opts/SkBitmapProcState_arm_neon.cpp
index d1f71c2..ce2656d 100644
--- a/src/opts/SkBitmapProcState_arm_neon.cpp
+++ b/src/opts/SkBitmapProcState_arm_neon.cpp
@@ -15,7 +15,6 @@
 
 // Required to ensure the table is part of the final binary.
 extern const SkBitmapProcState::SampleProc32 gSkBitmapProcStateSample32_neon[];
-extern const SkBitmapProcState::SampleProc16 gSkBitmapProcStateSample16_neon[];
 
 #define   NAME_WRAP(x)  x ## _neon
 #include "SkBitmapProcState_filter_neon.h"
@@ -79,30 +78,6 @@
     SG8_alpha_D32_filter_DX_neon,
 };
 
-const SkBitmapProcState::SampleProc16 gSkBitmapProcStateSample16_neon[] = {
-    S32_D16_nofilter_DXDY_neon,
-    S32_D16_nofilter_DX_neon,
-    S32_D16_filter_DXDY_neon,
-    S32_D16_filter_DX_neon,
-
-    S16_D16_nofilter_DXDY_neon,
-    S16_D16_nofilter_DX_neon,
-    S16_D16_filter_DXDY_neon,
-    S16_D16_filter_DX_neon,
-
-    SI8_D16_nofilter_DXDY_neon,
-    SI8_D16_nofilter_DX_neon,
-    SI8_D16_filter_DXDY_neon,
-    SI8_D16_filter_DX_neon,
-
-    // Don't support 4444 -> 565
-    nullptr, nullptr, nullptr, nullptr,
-    // Don't support A8 -> 565
-    nullptr, nullptr, nullptr, nullptr,
-    // Don't support G8 -> 565 (but we could)
-    nullptr, nullptr, nullptr, nullptr,
-};
-
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <arm_neon.h>
diff --git a/src/opts/SkBitmapProcState_opts_mips_dsp.cpp b/src/opts/SkBitmapProcState_opts_mips_dsp.cpp
index dac4e20..a80e955 100644
--- a/src/opts/SkBitmapProcState_opts_mips_dsp.cpp
+++ b/src/opts/SkBitmapProcState_opts_mips_dsp.cpp
@@ -12,138 +12,6 @@
 #include "SkPaint.h"
 #include "SkUtils.h"
 
-static void SI8_D16_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
-                                         const uint32_t* SK_RESTRICT xy,
-                                         int count, uint16_t* SK_RESTRICT colors) {
-    SkASSERT(count > 0 && colors != nullptr);
-    SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
-    SkASSERT(kNone_SkFilterQuality == s.fFilterLevel);
-    const uint16_t* SK_RESTRICT table = s.fPixmap.ctable()->read16BitCache();
-    const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fPixmap.addr();
-    SkASSERT((unsigned)xy[0] < (unsigned)s.fPixmap.height());
-    srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fPixmap.rowBytes());
-    uint8_t src;
-
-    if (1 == s.fPixmap.width()) {
-        src = srcAddr[0];
-        uint16_t dstValue = table[src];
-        sk_memset16(colors, dstValue, count);
-    } else {
-        int count8;
-        const uint16_t* SK_RESTRICT xx = (const uint16_t*)(xy + 1);
-
-        __asm__ volatile (
-            ".set    push                                \n\t"
-            ".set    noreorder                           \n\t"
-            ".set    noat                                \n\t"
-            "sra     %[count8], %[count],      3         \n\t"
-            "beqz    %[count8], 3f                       \n\t"
-            " addiu  %[count8], %[count8],     -1        \n\t"
-        "1:                                              \n\t"
-            "beqz    %[count8], 2f                       \n\t"
-            " addiu  %[count8], %[count8],     -1        \n\t"
-            "pref    0,         16(%[xx])                \n\t"
-            "lhu     $t0,       0(%[xx])                 \n\t"
-            "lhu     $t1,       2(%[xx])                 \n\t"
-            "lhu     $t2,       4(%[xx])                 \n\t"
-            "lhu     $t3,       6(%[xx])                 \n\t"
-            "lhu     $t4,       8(%[xx])                 \n\t"
-            "lhu     $t5,       10(%[xx])                \n\t"
-            "lhu     $t6,       12(%[xx])                \n\t"
-            "lhu     $t7,       14(%[xx])                \n\t"
-            "pref    0,         8(%[srcAddr])            \n\t"
-            "lbux    $t0,       $t0(%[srcAddr])          \n\t"
-            "lbux    $t1,       $t1(%[srcAddr])          \n\t"
-            "lbux    $t2,       $t2(%[srcAddr])          \n\t"
-            "lbux    $t3,       $t3(%[srcAddr])          \n\t"
-            "lbux    $t4,       $t4(%[srcAddr])          \n\t"
-            "lbux    $t5,       $t5(%[srcAddr])          \n\t"
-            "lbux    $t6,       $t6(%[srcAddr])          \n\t"
-            "lbux    $t7,       $t7(%[srcAddr])          \n\t"
-            "addu    $t0,       $t0,           $t0       \n\t"
-            "addu    $t1,       $t1,           $t1       \n\t"
-            "addu    $t2,       $t2,           $t2       \n\t"
-            "addu    $t3,       $t3,           $t3       \n\t"
-            "addu    $t4,       $t4,           $t4       \n\t"
-            "addu    $t5,       $t5,           $t5       \n\t"
-            "addu    $t6,       $t6,           $t6       \n\t"
-            "addu    $t7,       $t7,           $t7       \n\t"
-            "pref    0,         16(%[table])             \n\t"
-            "lhx     $t0,       $t0(%[table])            \n\t"
-            "lhx     $t1,       $t1(%[table])            \n\t"
-            "lhx     $t2,       $t2(%[table])            \n\t"
-            "lhx     $t3,       $t3(%[table])            \n\t"
-            "lhx     $t4,       $t4(%[table])            \n\t"
-            "lhx     $t5,       $t5(%[table])            \n\t"
-            "lhx     $t6,       $t6(%[table])            \n\t"
-            "lhx     $t7,       $t7(%[table])            \n\t"
-            "sh      $t0,       0(%[colors])             \n\t"
-            "sh      $t1,       2(%[colors])             \n\t"
-            "sh      $t2,       4(%[colors])             \n\t"
-            "sh      $t3,       6(%[colors])             \n\t"
-            "sh      $t4,       8(%[colors])             \n\t"
-            "sh      $t5,       10(%[colors])            \n\t"
-            "sh      $t6,       12(%[colors])            \n\t"
-            "sh      $t7,       14(%[colors])            \n\t"
-            "addiu   %[xx],     %[xx],         16        \n\t"
-            "bgtz    %[count8], 1b                       \n\t"
-            " addiu  %[colors], %[colors],     16        \n\t"
-        "2:                                              \n\t"
-            "lhu     $t0,       0(%[xx])                 \n\t"
-            "lhu     $t1,       2(%[xx])                 \n\t"
-            "lhu     $t2,       4(%[xx])                 \n\t"
-            "lhu     $t3,       6(%[xx])                 \n\t"
-            "lhu     $t4,       8(%[xx])                 \n\t"
-            "lhu     $t5,       10(%[xx])                \n\t"
-            "lhu     $t6,       12(%[xx])                \n\t"
-            "lhu     $t7,       14(%[xx])                \n\t"
-            "lbux    $t0,       $t0(%[srcAddr])          \n\t"
-            "lbux    $t1,       $t1(%[srcAddr])          \n\t"
-            "lbux    $t2,       $t2(%[srcAddr])          \n\t"
-            "lbux    $t3,       $t3(%[srcAddr])          \n\t"
-            "lbux    $t4,       $t4(%[srcAddr])          \n\t"
-            "lbux    $t5,       $t5(%[srcAddr])          \n\t"
-            "lbux    $t6,       $t6(%[srcAddr])          \n\t"
-            "lbux    $t7,       $t7(%[srcAddr])          \n\t"
-            "addu    $t0,       $t0,           $t0       \n\t"
-            "addu    $t1,       $t1,           $t1       \n\t"
-            "addu    $t2,       $t2,           $t2       \n\t"
-            "addu    $t3,       $t3,           $t3       \n\t"
-            "addu    $t4,       $t4,           $t4       \n\t"
-            "addu    $t5,       $t5,           $t5       \n\t"
-            "addu    $t6,       $t6,           $t6       \n\t"
-            "addu    $t7,       $t7,           $t7       \n\t"
-            "lhx     $t0,       $t0(%[table])            \n\t"
-            "lhx     $t1,       $t1(%[table])            \n\t"
-            "lhx     $t2,       $t2(%[table])            \n\t"
-            "lhx     $t3,       $t3(%[table])            \n\t"
-            "lhx     $t4,       $t4(%[table])            \n\t"
-            "lhx     $t5,       $t5(%[table])            \n\t"
-            "lhx     $t6,       $t6(%[table])            \n\t"
-            "lhx     $t7,       $t7(%[table])            \n\t"
-            "sh      $t0,       0(%[colors])             \n\t"
-            "sh      $t1,       2(%[colors])             \n\t"
-            "sh      $t2,       4(%[colors])             \n\t"
-            "sh      $t3,       6(%[colors])             \n\t"
-            "sh      $t4,       8(%[colors])             \n\t"
-            "sh      $t5,       10(%[colors])            \n\t"
-            "sh      $t6,       12(%[colors])            \n\t"
-            "sh      $t7,       14(%[colors])            \n\t"
-            "addiu   %[xx],     %[xx],         16        \n\t"
-            "addiu   %[colors], %[colors],     16        \n\t"
-        "3:                                              \n\t"
-            ".set    pop                                 \n\t"
-            : [xx]"+r"(xx), [count8]"=&r"(count8), [colors]"+r"(colors)
-            : [table]"r"(table), [srcAddr]"r"(srcAddr), [count]"r"(count)
-            : "memory","t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"
-        );
-
-        for (int i = (count & 7); i > 0; --i) {
-            src = srcAddr[*xx++]; *colors++ = table[src];
-        }
-    }
-}
-
 static void SI8_opaque_D32_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
                                                 const uint32_t* SK_RESTRICT xy,
                                                 int count, SkPMColor* SK_RESTRICT colors) {
@@ -379,8 +247,6 @@
     switch (fPixmap.colorType()) {
         case kIndex_8_SkColorType:
             if (justDx && kNone_SkFilterQuality == fFilterLevel) {
-                fSampleProc16 = SI8_D16_nofilter_DX_mips_dsp;
-                fShaderProc16 = nullptr;
                 if (isOpaque) {
                     fSampleProc32 = SI8_opaque_D32_nofilter_DX_mips_dsp;
                     fShaderProc32 = nullptr;
diff --git a/src/opts/opts_check_x86.cpp b/src/opts/opts_check_x86.cpp
index 3c817e1..9983eb5 100644
--- a/src/opts/opts_check_x86.cpp
+++ b/src/opts/opts_check_x86.cpp
@@ -161,17 +161,6 @@
         }
     }
 
-    /* Check fSampleProc16 */
-    if (fSampleProc16 == S32_D16_filter_DX) {
-        if (ssse3) {
-            fSampleProc16 = S32_D16_filter_DX_SSSE3;
-        } else {
-            fSampleProc16 = S32_D16_filter_DX_SSE2;
-        }
-    } else if (ssse3 && fSampleProc16 == S32_D16_filter_DXDY) {
-        fSampleProc16 = S32_D16_filter_DXDY_SSSE3;
-    }
-
     /* Check fMatrixProc */
     if (fMatrixProc == ClampX_ClampY_filter_scale) {
         fMatrixProc = ClampX_ClampY_filter_scale_SSE2;