Index: src/effects/gradients/SkTwoPointConicalGradient.cpp |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
index 2a822e48292108ce7f31380ed9fc631923ba1715..a9bd1c276274f1ba952f8fd544e6fefb1f6f6190 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp |
@@ -236,16 +236,17 @@ void SkTwoPointConicalGradient::shadeSpan(int x, int y, SkPMColor* dstCParam, |
fRec.setup(fx, fy, dx, dy); |
(*shadeProc)(&fRec, dstC, cache, toggle, count); |
} else { // perspective case |
- SkScalar dstX = SkIntToScalar(x); |
- SkScalar dstY = SkIntToScalar(y); |
+ SkScalar dstX = SkIntToScalar(x) + SK_ScalarHalf; |
+ SkScalar dstY = SkIntToScalar(y) + SK_ScalarHalf; |
for (; count > 0; --count) { |
SkPoint srcPt; |
dstProc(fDstToIndex, dstX, dstY, &srcPt); |
- dstX += SK_Scalar1; |
- |
fRec.setup(srcPt.fX, srcPt.fY, 0, 0); |
(*shadeProc)(&fRec, dstC, cache, toggle, 1); |
+ |
+ dstX += SK_Scalar1; |
toggle = next_dither_toggle(toggle); |
+ dstC += 1; |
} |
} |
} |