diff options
author | Mike Reed <reed@google.com> | 2017-06-06 09:18:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-06 13:41:19 +0000 |
commit | 1608a1dd17187aeeada376e710ecfafb1e229af2 (patch) | |
tree | 960761a4bc519634ab58a78d151b94275e09f90f /src | |
parent | f4a5fc7af06e71d03b967416fa6a11e59184e62f (diff) |
remove unused xfermode methods
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: Ibc7d581bcc40134ee7cf57bb65fee2d70e119bc7
Reviewed-on: https://skia-review.googlesource.com/18842
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkXfermode.cpp | 110 | ||||
-rw-r--r-- | src/core/SkXfermodePriv.h | 4 | ||||
-rw-r--r-- | src/core/SkXfermode_proccoeff.h | 4 | ||||
-rw-r--r-- | src/opts/SkXfermode_opts.h | 41 |
4 files changed, 0 insertions, 159 deletions
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp index 11be44b3e5..b2fb40b20f 100644 --- a/src/core/SkXfermode.cpp +++ b/src/core/SkXfermode.cpp @@ -1038,57 +1038,6 @@ void SkXfermode::xfer32(SkPMColor* SK_RESTRICT dst, } } -void SkXfermode::xfer16(uint16_t* dst, - const SkPMColor* SK_RESTRICT src, int count, - const SkAlpha* SK_RESTRICT aa) const { - SkASSERT(dst && src && count >= 0); - - if (nullptr == aa) { - for (int i = count - 1; i >= 0; --i) { - SkPMColor dstC = SkPixel16ToPixel32(dst[i]); - dst[i] = SkPixel32ToPixel16_ToU16(this->xferColor(src[i], dstC)); - } - } else { - for (int i = count - 1; i >= 0; --i) { - unsigned a = aa[i]; - if (0 != a) { - SkPMColor dstC = SkPixel16ToPixel32(dst[i]); - SkPMColor C = this->xferColor(src[i], dstC); - if (0xFF != a) { - C = SkFourByteInterp(C, dstC, a); - } - dst[i] = SkPixel32ToPixel16_ToU16(C); - } - } - } -} - -void SkXfermode::xferA8(SkAlpha* SK_RESTRICT dst, - const SkPMColor src[], int count, - const SkAlpha* SK_RESTRICT aa) const { - SkASSERT(dst && src && count >= 0); - - if (nullptr == aa) { - for (int i = count - 1; i >= 0; --i) { - SkPMColor res = this->xferColor(src[i], (dst[i] << SK_A32_SHIFT)); - dst[i] = SkToU8(SkGetPackedA32(res)); - } - } else { - for (int i = count - 1; i >= 0; --i) { - unsigned a = aa[i]; - if (0 != a) { - SkAlpha dstA = dst[i]; - unsigned A = SkGetPackedA32(this->xferColor(src[i], - (SkPMColor)(dstA << SK_A32_SHIFT))); - if (0xFF != a) { - A = SkAlphaBlend(A, dstA, SkAlpha255To256(a)); - } - dst[i] = SkToU8(A); - } - } - } -} - bool SkXfermode::supportsCoverageAsAlpha() const { return false; } @@ -1188,65 +1137,6 @@ void SkProcCoeffXfermode::xfer32(SkPMColor* SK_RESTRICT dst, } } -void SkProcCoeffXfermode::xfer16(uint16_t* SK_RESTRICT dst, - const SkPMColor* SK_RESTRICT src, int count, - const SkAlpha* SK_RESTRICT aa) const { - SkASSERT(dst && src && count >= 0); - - SkXfermodeProc proc = fProc; - - if (proc) { - if (nullptr == aa) { - for (int i = count - 1; i >= 0; --i) { - SkPMColor dstC = SkPixel16ToPixel32(dst[i]); - dst[i] = SkPixel32ToPixel16_ToU16(proc(src[i], dstC)); - } - } else { - for (int i = count - 1; i >= 0; --i) { - unsigned a = aa[i]; - if (0 != a) { - SkPMColor dstC = SkPixel16ToPixel32(dst[i]); - SkPMColor C = proc(src[i], dstC); - if (0xFF != a) { - C = SkFourByteInterp(C, dstC, a); - } - dst[i] = SkPixel32ToPixel16_ToU16(C); - } - } - } - } -} - -void SkProcCoeffXfermode::xferA8(SkAlpha* SK_RESTRICT dst, - const SkPMColor* SK_RESTRICT src, int count, - const SkAlpha* SK_RESTRICT aa) const { - SkASSERT(dst && src && count >= 0); - - SkXfermodeProc proc = fProc; - - if (proc) { - if (nullptr == aa) { - for (int i = count - 1; i >= 0; --i) { - SkPMColor res = proc(src[i], dst[i] << SK_A32_SHIFT); - dst[i] = SkToU8(SkGetPackedA32(res)); - } - } else { - for (int i = count - 1; i >= 0; --i) { - unsigned a = aa[i]; - if (0 != a) { - SkAlpha dstA = dst[i]; - SkPMColor res = proc(src[i], dstA << SK_A32_SHIFT); - unsigned A = SkGetPackedA32(res); - if (0xFF != a) { - A = SkAlphaBlend(A, dstA, SkAlpha255To256(a)); - } - dst[i] = SkToU8(A); - } - } - } - } -} - #if SK_SUPPORT_GPU sk_sp<GrFragmentProcessor> SkProcCoeffXfermode::makeFragmentProcessorForImageFilter( sk_sp<GrFragmentProcessor> dst) const { diff --git a/src/core/SkXfermodePriv.h b/src/core/SkXfermodePriv.h index 2fae2c0ed0..f0fedbf74b 100644 --- a/src/core/SkXfermodePriv.h +++ b/src/core/SkXfermodePriv.h @@ -38,10 +38,6 @@ class SK_API SkXfermode : public SkFlattenable { public: virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, const SkAlpha aa[]) const; - virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const; - virtual void xferA8(SkAlpha dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const; /** Enum of possible coefficients to describe some xfermodes */ diff --git a/src/core/SkXfermode_proccoeff.h b/src/core/SkXfermode_proccoeff.h index 372453218a..b6d322025c 100644 --- a/src/core/SkXfermode_proccoeff.h +++ b/src/core/SkXfermode_proccoeff.h @@ -32,10 +32,6 @@ public: void xfer32(SkPMColor dst[], const SkPMColor src[], int count, const SkAlpha aa[]) const override; - void xfer16(uint16_t dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const override; - void xferA8(SkAlpha dst[], const SkPMColor src[], int count, - const SkAlpha aa[]) const override; bool asMode(Mode* mode) const override; diff --git a/src/opts/SkXfermode_opts.h b/src/opts/SkXfermode_opts.h index 81e5bb9f30..e7db073392 100644 --- a/src/opts/SkXfermode_opts.h +++ b/src/opts/SkXfermode_opts.h @@ -229,39 +229,6 @@ public: } } - void xfer16(uint16_t dst[], const SkPMColor src[], int n, const SkAlpha aa[]) const override { - mark_dst_initialized_if_safe<Xfermode>(dst, dst+n); - SkPMColor dst32[4]; - while (n >= 4) { - dst32[0] = SkPixel16ToPixel32(dst[0]); - dst32[1] = SkPixel16ToPixel32(dst[1]); - dst32[2] = SkPixel16ToPixel32(dst[2]); - dst32[3] = SkPixel16ToPixel32(dst[3]); - - this->xfer32(dst32, src, 4, aa); - - dst[0] = SkPixel32ToPixel16(dst32[0]); - dst[1] = SkPixel32ToPixel16(dst32[1]); - dst[2] = SkPixel32ToPixel16(dst32[2]); - dst[3] = SkPixel32ToPixel16(dst32[3]); - - dst += 4; - src += 4; - aa += aa ? 4 : 0; - n -= 4; - } - while (n) { - SkPMColor dst32 = SkPixel16ToPixel32(*dst); - this->xfer32(&dst32, src, 1, aa); - *dst = SkPixel32ToPixel16(dst32); - - dst += 1; - src += 1; - aa += aa ? 1 : 0; - n -= 1; - } - } - private: typedef SkProcCoeffXfermode INHERITED; }; @@ -278,14 +245,6 @@ public: } } - void xfer16(uint16_t dst[], const SkPMColor src[], int n, const SkAlpha aa[]) const override { - for (int i = 0; i < n; i++) { - SkPMColor dst32 = SkPixel16ToPixel32(dst[i]); - dst32 = Xfer32_1(dst32, src[i], aa ? aa+i : nullptr); - dst[i] = SkPixel32ToPixel16(dst32); - } - } - private: static SkPMColor Xfer32_1(SkPMColor dst, const SkPMColor src, const SkAlpha* aa) { Sk4f d = Load(dst), |