aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-07 20:28:49 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-07 20:28:49 +0000
commit53009ba7019cbe86a6ab2aa5b7ae5893e4efffbd (patch)
treeb7bbff53cf7ae91e93d51e6f1a6f9f15981f778e /src/effects
parent5b25a8d72d129cdfd8fe001635941cf725bcf2bd (diff)
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
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp2
1 files changed, 1 insertions, 1 deletions
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;