aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-16 17:12:38 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-16 17:12:38 +0000
commit10d02b6ba9f626af5a26a82c288e1beb0002914d (patch)
tree32ef5da7d88926bee6f36d1f857a732205dc7793
parenta9abac2c75ea1844dc7214c213e4db6761d8181b (diff)
need to invert the alpha computation for single scanline on innerfill
found by Fuzzer git-svn-id: http://skia.googlecode.com/svn/trunk@3694 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/core/SkScan_Antihair.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp
index 3a60778e8f..6c920adc07 100644
--- a/src/core/SkScan_Antihair.cpp
+++ b/src/core/SkScan_Antihair.cpp
@@ -769,7 +769,11 @@ static void innerstrokedot8(FDot8 L, FDot8 T, FDot8 R, FDot8 B,
int top = T >> 8;
if (top == ((B - 1) >> 8)) { // just one scanline high
- inner_scanline(L, top, R, B - T, blitter);
+ // We want the inverse of B-T, since we're the inner-stroke
+ int alpha = 256 - (B - T);
+ if (alpha) {
+ inner_scanline(L, top, R, alpha, blitter);
+ }
return;
}