From: reed@google.com Date: Thu, 7 Feb 2013 20:28:49 +0000 (+0000) Subject: only take the vertical special-case for gradients when dx is exactly 0, as a X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~13491 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53009ba7019cbe86a6ab2aa5b7ae5893e4efffbd;p=platform%2Fupstream%2FlibSkiaSharp.git 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 --- diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp index 16a1168..f6bae72 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;