From 53009ba7019cbe86a6ab2aa5b7ae5893e4efffbd Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 7 Feb 2013 20:28:49 +0000 Subject: only take the vertical special-case for gradients when dx is exactly 0, as a zoomed gradient can have a very small dx, but be no where near to vertical. http://code.google.com/p/skia/issues/detail?id=1101 Review URL: https://codereview.appspot.com/7310059 git-svn-id: http://skia.googlecode.com/svn/trunk@7653 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/effects/gradients/SkLinearGradient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/effects') diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index 16a1168647..f6bae725dc 100644 --- a/src/effects/gradients/SkLinearGradient.cpp +++ b/src/effects/gradients/SkLinearGradient.cpp @@ -240,7 +240,7 @@ void SkLinearGradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC, } LinearShadeProc shadeProc = shadeSpan_linear_repeat; - if (SkFixedNearlyZero(dx)) { + if (0 == dx) { shadeProc = shadeSpan_linear_vertical_lerp; } else if (SkShader::kClamp_TileMode == fTileMode) { shadeProc = shadeSpan_linear_clamp; -- cgit v1.2.3