Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: src/core/SkXfermode.cpp

Issue 264923004: remove code behind SK_SUPPORT_LEGACY_PROCXFERMODE (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove dead comments Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode.cpp
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 73d0b01e1e6f2436590f5fec1239ccccfc3679c1..182d3b7197ce20b168275fdd10f73bb25b53f830 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -774,118 +774,6 @@ void SkXfermode::xferA8(SkAlpha* SK_RESTRICT dst,
}
}
-///////////////////////////////////////////////////////////////////////////////
-#ifdef SK_SUPPORT_LEGACY_PROCXFERMODE
-
-void SkProcXfermode::xfer32(SkPMColor* 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 (NULL != proc) {
- if (NULL == aa) {
- for (int i = count - 1; i >= 0; --i) {
- dst[i] = proc(src[i], dst[i]);
- }
- } else {
- for (int i = count - 1; i >= 0; --i) {
- unsigned a = aa[i];
- if (0 != a) {
- SkPMColor dstC = dst[i];
- SkPMColor C = proc(src[i], dstC);
- if (a != 0xFF) {
- C = SkFourByteInterp(C, dstC, a);
- }
- dst[i] = C;
- }
- }
- }
- }
-}
-
-void SkProcXfermode::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 (NULL != proc) {
- if (NULL == 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 SkProcXfermode::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 (NULL != proc) {
- if (NULL == 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);
- }
- }
- }
- }
-}
-
-SkProcXfermode::SkProcXfermode(SkReadBuffer& buffer)
- : SkXfermode(buffer) {
- fProc = NULL;
- if (!buffer.isCrossProcess()) {
- fProc = (SkXfermodeProc)buffer.readFunctionPtr();
- }
-}
-
-void SkProcXfermode::flatten(SkWriteBuffer& buffer) const {
- this->INHERITED::flatten(buffer);
- if (!buffer.isCrossProcess()) {
- buffer.writeFunctionPtr((void*)fProc);
- }
-}
-
-#ifndef SK_IGNORE_TO_STRING
-void SkProcXfermode::toString(SkString* str) const {
- str->appendf("SkProcXfermode: %p", fProc);
-}
-#endif
-
-#endif
//////////////////////////////////////////////////////////////////////////////
#if SK_SUPPORT_GPU
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698