aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState_procs.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-06-29 13:46:42 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-29 19:13:50 +0000
commit41dc6cc6213a4e54597325026b4a08aaf27b8780 (patch)
treec043c2a2a305691849cf112147e72df16bbccbdf /src/core/SkBitmapProcState_procs.h
parent5d00f008cea93671b0f48736f6f4bbe6cb964391 (diff)
remove unreachable samples for non-N32 imageshaders
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: I2d9a22b22d72c81a742b8fd497797bff8174915b Reviewed-on: https://skia-review.googlesource.com/21264 Commit-Queue: Eric Boren <borenet@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src/core/SkBitmapProcState_procs.h')
-rw-r--r--src/core/SkBitmapProcState_procs.h147
1 files changed, 0 insertions, 147 deletions
diff --git a/src/core/SkBitmapProcState_procs.h b/src/core/SkBitmapProcState_procs.h
index fb104ace9c..e0aff3fdd6 100644
--- a/src/core/SkBitmapProcState_procs.h
+++ b/src/core/SkBitmapProcState_procs.h
@@ -76,12 +76,6 @@ static inline U8CPU Filter_8(unsigned x, unsigned y,
return result >> 8;
}
-/*****************************************************************************
- *
- * D32 functions
- *
- */
-
// SRC == 8888
#define FILTER_PROC(x, y, a, b, c, d, dst) NAME_WRAP(Filter_32_opaque)(x, y, a, b, c, d, dst)
@@ -106,145 +100,4 @@ static inline U8CPU Filter_8(unsigned x, unsigned y,
#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) = SkExpanded_565_To_PMColor(tmp); \
- } while (0)
-
-#define MAKENAME(suffix) NAME_WRAP(S16_opaque_D32 ## suffix)
-#define SRCTYPE uint16_t
-#define CHECKSTATE(state) SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType()); \
- SkASSERT(state.fAlphaScale == 256)
-#define RETURNDST(src) SkPixel16ToPixel32(src)
-#define SRC_TO_FILTER(src) src
-#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) = SkAlphaMulQ(SkExpanded_565_To_PMColor(tmp), alphaScale); \
- } while (0)
-
-#define MAKENAME(suffix) NAME_WRAP(S16_alpha_D32 ## suffix)
-#define SRCTYPE uint16_t
-#define CHECKSTATE(state) SkASSERT(kRGB_565_SkColorType == state.fPixmap.colorType()); \
- SkASSERT(state.fAlphaScale < 256)
-#define PREAMBLE(state) unsigned alphaScale = state.fAlphaScale
-#define RETURNDST(src) SkAlphaMulQ(SkPixel16ToPixel32(src), alphaScale)
-#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) NAME_WRAP(Filter_32_opaque)(x, y, a, b, c, d, dst)
-
-#define MAKENAME(suffix) NAME_WRAP(SI8_opaque_D32 ## suffix)
-#define SRCTYPE uint8_t
-#define CHECKSTATE(state) SkASSERT(kIndex_8_SkColorType == state.fPixmap.colorType()); \
- SkASSERT(state.fAlphaScale == 256)
-#define PREAMBLE(state) const SkPMColor* SK_RESTRICT table = state.fPixmap.ctable()->readColors()
-#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) NAME_WRAP(Filter_32_alpha)(x, y, a, b, c, d, dst, alphaScale)
-
-#define MAKENAME(suffix) NAME_WRAP(SI8_alpha_D32 ## suffix)
-#define SRCTYPE uint8_t
-#define CHECKSTATE(state) SkASSERT(kIndex_8_SkColorType == state.fPixmap.colorType()); \
- SkASSERT(state.fAlphaScale < 256)
-#define PREAMBLE(state) unsigned alphaScale = state.fAlphaScale; \
- const SkPMColor* SK_RESTRICT table = state.fPixmap.ctable()->readColors()
-#define RETURNDST(src) SkAlphaMulQ(table[src], alphaScale)
-#define SRC_TO_FILTER(src) table[src]
-#define POSTAMBLE(state)
-#include "SkBitmapProcState_sample.h"
-
-// SRC == 4444
-
-#undef FILTER_PROC
-#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 SRCTYPE SkPMColor16
-#define CHECKSTATE(state) SkASSERT(kARGB_4444_SkColorType == state.fPixmap.colorType()); \
- SkASSERT(state.fAlphaScale == 256)
-#define RETURNDST(src) SkPixel4444ToPixel32(src)
-#define SRC_TO_FILTER(src) src
-#include "SkBitmapProcState_sample.h"
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
- do { \
- uint32_t tmp = Filter_4444_D32(x, y, a, b, c, d); \
- *(dst) = SkAlphaMulQ(tmp, alphaScale); \
- } while (0)
-
-#define MAKENAME(suffix) NAME_WRAP(S4444_alpha_D32 ## suffix)
-#define SRCTYPE SkPMColor16
-#define CHECKSTATE(state) SkASSERT(kARGB_4444_SkColorType == state.fPixmap.colorType()); \
- SkASSERT(state.fAlphaScale < 256)
-#define PREAMBLE(state) unsigned alphaScale = state.fAlphaScale
-#define RETURNDST(src) SkAlphaMulQ(SkPixel4444ToPixel32(src), alphaScale)
-#define SRC_TO_FILTER(src) src
-#include "SkBitmapProcState_sample.h"
-
-// SRC == A8
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
- do { \
- unsigned tmp = Filter_8(x, y, a, b, c, d); \
- *(dst) = SkAlphaMulQ(pmColor, SkAlpha255To256(tmp)); \
- } while (0)
-
-#define MAKENAME(suffix) NAME_WRAP(SA8_alpha_D32 ## suffix)
-#define SRCTYPE uint8_t
-#define CHECKSTATE(state) SkASSERT(kAlpha_8_SkColorType == state.fPixmap.colorType());
-#define PREAMBLE(state) const SkPMColor pmColor = state.fPaintPMColor;
-#define RETURNDST(src) SkAlphaMulQ(pmColor, SkAlpha255To256(src))
-#define SRC_TO_FILTER(src) src
-#include "SkBitmapProcState_sample.h"
-
-// SRC == Gray8
-
-#undef FILTER_PROC
-#define FILTER_PROC(x, y, a, b, c, d, dst) \
- do { \
- unsigned tmp = Filter_8(x, y, a, b, c, d); \
- SkPMColor color = SkPackARGB32(0xFF, tmp, tmp, tmp); \
- *(dst) = SkAlphaMulQ(color, alphaScale); \
- } while (0)
-
-#define MAKENAME(suffix) NAME_WRAP(SG8_alpha_D32 ## suffix)
-#define SRCTYPE uint8_t
-#define CHECKSTATE(state) SkASSERT(kGray_8_SkColorType == state.fPixmap.colorType());
-#define PREAMBLE(state) unsigned alphaScale = state.fAlphaScale
-#define RETURNDST(src) SkAlphaMulQ(SkPackARGB32(0xFF, src, src, src), alphaScale)
-#define SRC_TO_FILTER(src) src
-#include "SkBitmapProcState_sample.h"
-
-
-#define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max)
-#define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max)
-#define EXTRACT_LOW_BITS(v, max) (((v) >> 12) & 0xF)
-
-#undef FILTER_PROC
-#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 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]
-#define POSTAMBLE(state)
-#include "SkBitmapProcState_shaderproc.h"
-
#undef NAME_WRAP