correctly compute coverage when an antialiased rect covers only 1 column of pixels

git-svn-id: http://skia.googlecode.com/svn/trunk@1256 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-05-05 14:24:47 +00:00
parent 70b6125ed2
commit f7398c3ab6

View File

@ -533,17 +533,21 @@ static void antifilldot8(FDot8 L, FDot8 T, FDot8 R, FDot8 B, SkBlitter* blitter,
int height = bot - top; int height = bot - top;
if (height > 0) { if (height > 0) {
int left = L >> 8; int left = L >> 8;
if (L & 0xFF) { if (left == ((R - 1) >> 8)) { // just 1-pixel wide
blitter->blitV(left, top, height, 256 - (L & 0xFF)); blitter->blitV(left, top, height, R - L - 1);
left += 1; } else {
} if (L & 0xFF) {
int rite = R >> 8; blitter->blitV(left, top, height, 256 - (L & 0xFF));
int width = rite - left; left += 1;
if (width > 0 && fillInner) { }
blitter->blitRect(left, top, width, height); int rite = R >> 8;
} int width = rite - left;
if (R & 0xFF) { if (width > 0 && fillInner) {
blitter->blitV(rite, top, height, R & 0xFF); blitter->blitRect(left, top, width, height);
}
if (R & 0xFF) {
blitter->blitV(rite, top, height, R & 0xFF);
}
} }
} }