fix general-pespective for conical gradient bug=1744
BUG= R=edisonn@google.com Review URL: https://codereview.chromium.org/71303003 git-svn-id: http://skia.googlecode.com/svn/trunk@12299 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
7d4890c6f6
commit
139a2359ab
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user