From f925ba4332db72db18ec2fc1b2fb9dd48949fe36 Mon Sep 17 00:00:00 2001 From: "tomhudson@google.com" Date: Wed, 11 Jan 2012 21:54:26 +0000 Subject: Remove obsolete SK_USE_FLOAT_SQRT http://codereview.appspot.com/5535053/ git-svn-id: http://skia.googlecode.com/svn/trunk@3023 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/effects/SkGradientShader.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp index a907d04a0d..bf7f4df483 100644 --- a/src/effects/SkGradientShader.cpp +++ b/src/effects/SkGradientShader.cpp @@ -16,10 +16,6 @@ #include "SkTemplates.h" #include "SkBitmapCache.h" -#if defined(SK_SCALAR_IS_FLOAT) && !defined(SK_DONT_USE_FLOAT_SQRT) - #define SK_USE_FLOAT_SQRT -#endif - #ifndef SK_DISABLE_DITHER_32BIT_GRADIENT #define USE_DITHER_32BIT_GRADIENT #endif @@ -1517,7 +1513,7 @@ void shadeSpan_radial_clamp(SkFixed fx, SkFixed dx, SkFixed fy, SkFixed dy, void shadeSpan_radial_mirror(SkFixed fx, SkFixed dx, SkFixed fy, SkFixed dy, SkPMColor* SK_RESTRICT dstC, const SkPMColor* SK_RESTRICT cache, int count, SkPoint& srcPt, float fdx, float fdy) { -#ifdef SK_USE_FLOAT_SQRT +#ifdef SK_SCALAR_IS_FLOAT float ffx = srcPt.fX; float ffy = srcPt.fY; do { @@ -1584,7 +1580,7 @@ void Radial_Gradient::shadeSpan(int x, int y, (void)fDstToIndex.fixedStepInX(SkIntToScalar(y), &storage[0], &storage[1]); dx = storage[0]; dy = storage[1]; -#ifdef SK_USE_FLOAT_SQRT +#ifdef SK_SCALAR_IS_FLOAT fdx = SkFixedToFloat(storage[0]); fdy = SkFixedToFloat(storage[1]); #endif @@ -1592,7 +1588,7 @@ void Radial_Gradient::shadeSpan(int x, int y, SkASSERT(fDstToIndexClass == kLinear_MatrixClass); dx = SkScalarToFixed(fDstToIndex.getScaleX()); dy = SkScalarToFixed(fDstToIndex.getSkewY()); -#ifdef SK_USE_FLOAT_SQRT +#ifdef SK_SCALAR_IS_FLOAT fdx = fDstToIndex.getScaleX(); fdy = fDstToIndex.getSkewY(); #endif -- cgit v1.2.3