From fc28bd5db465dd98fb8d6295de90064a7170e6c5 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 22 Feb 2013 13:03:29 +0000 Subject: remove obsolete build flag SK_IGNORE_GRADIENT_DITHER_FIX git-svn-id: http://skia.googlecode.com/svn/trunk@7818 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/effects/gradients/SkLinearGradient.cpp | 4 ---- src/effects/gradients/SkSweepGradient.cpp | 8 -------- src/effects/gradients/SkTwoPointConicalGradient.cpp | 12 ------------ 3 files changed, 24 deletions(-) (limited to 'src/effects') diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index adc60f8024..3f8d7cccba 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -94,11 +94,7 @@ bool SkLinearGradient::setContext(const SkBitmap& device, const SkPaint& paint, unsigned mask = SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask; if ((fDstToIndex.getType() & ~mask) == 0) { -#ifdef SK_IGNORE_GRADIENT_DITHER_FIX - fFlags |= SkShader::kConstInY32_Flag; -#else // when we dither, we are (usually) not const-in-Y -#endif if ((fFlags & SkShader::kHasSpan16_Flag) && !paint.isDither()) { // only claim this if we do have a 16bit mode (i.e. none of our // colors have alpha), and if we are not dithering (which obviously diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp index b5d94aadc2..fe516ba007 100644 --- a/src/effects/gradients/SkSweepGradient.cpp +++ b/src/effects/gradients/SkSweepGradient.cpp @@ -298,11 +298,7 @@ void SkSweepGradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, SkMatrix::MapXYProc proc = fDstToIndexProc; const SkMatrix& matrix = fDstToIndex; const SkPMColor* SK_RESTRICT cache = this->getCache32(); -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX int toggle = init_dither_toggle(x, y); -#else - int toggle = 0; -#endif SkPoint srcPt; if (fDstToIndexClass != kPerspective_MatrixClass) { @@ -327,18 +323,14 @@ void SkSweepGradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, *dstC++ = cache[toggle + SkATan2_255(fy, fx)]; fx += dx; fy += dy; -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX toggle = next_dither_toggle(toggle); -#endif } } else { // perspective case for (int stop = x + count; x < stop; x++) { proc(matrix, SkIntToScalar(x) + SK_ScalarHalf, SkIntToScalar(y) + SK_ScalarHalf, &srcPt); *dstC++ = cache[toggle + SkATan2_255(srcPt.fY, srcPt.fX)]; -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX toggle = next_dither_toggle(toggle); -#endif } } } diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp index 5c11d4cffa..1496033941 100644 --- a/src/effects/gradients/SkTwoPointConicalGradient.cpp +++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp @@ -129,9 +129,7 @@ static void twopoint_clamp(TwoPtRadial* rec, SkPMColor* SK_RESTRICT dstC, *dstC++ = cache[toggle + (index >> SkGradientShaderBase::kCache32Shift)]; } -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX toggle = next_dither_toggle(toggle); -#endif } } @@ -148,9 +146,7 @@ static void twopoint_repeat(TwoPtRadial* rec, SkPMColor* SK_RESTRICT dstC, *dstC++ = cache[toggle + (index >> SkGradientShaderBase::kCache32Shift)]; } -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX toggle = next_dither_toggle(toggle); -#endif } } @@ -167,9 +163,7 @@ static void twopoint_mirror(TwoPtRadial* rec, SkPMColor* SK_RESTRICT dstC, *dstC++ = cache[toggle + (index >> SkGradientShaderBase::kCache32Shift)]; } -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX toggle = next_dither_toggle(toggle); -#endif } } @@ -198,11 +192,7 @@ SkTwoPointConicalGradient::SkTwoPointConicalGradient( void SkTwoPointConicalGradient::shadeSpan(int x, int y, SkPMColor* dstCParam, int count) { -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX int toggle = init_dither_toggle(x, y); -#else - int toggle = 0; -#endif SkASSERT(count > 0); @@ -251,9 +241,7 @@ void SkTwoPointConicalGradient::shadeSpan(int x, int y, SkPMColor* dstCParam, fRec.setup(srcPt.fX, srcPt.fY, 0, 0); (*shadeProc)(&fRec, dstC, cache, toggle, 1); -#ifndef SK_IGNORE_GRADIENT_DITHER_FIX toggle = next_dither_toggle(toggle); -#endif } } } -- cgit v1.2.3