use static_cast
fix comments
git-svn-id: http://skia.googlecode.com/svn/trunk@135 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp
index b540573..e3ee900 100644
--- a/src/core/SkScan_Antihair.cpp
+++ b/src/core/SkScan_Antihair.cpp
@@ -27,7 +27,7 @@
NULL (for speed), and thus draw outside of the clip by a pixel, which might
only look bad, but it might also access memory outside of the valid range
allcoated for the device bitmap.
-
+
This define enables our fix to outset our "bounds" by 1, thus avoiding the
chance of the bug, but at the cost of sometimes taking the rectblitter
case (i.e. not setting the clip to NULL) when we might not actually need
@@ -305,10 +305,10 @@
bottom = SkFixedCeil(fstart + SK_FixedHalf);
top = SkFixedFloor(fstart + (istop - istart - 1) * slope - SK_FixedHalf);
}
- if (OUTSET_BEFORE_CLIP_TEST) {
- top -= 1;
- bottom += 1;
- }
+#ifdef OUTSET_BEFORE_CLIP_TEST
+ top -= 1;
+ bottom += 1;
+#endif
if (top >= clip->fBottom || bottom <= clip->fTop)
return;
if (clip->fTop <= top && clip->fBottom >= bottom)
@@ -382,10 +382,10 @@
right = SkFixedCeil(fstart + SK_FixedHalf);
left = SkFixedFloor(fstart + (istop - istart - 1) * slope - SK_FixedHalf);
}
- if (OUTSET_BEFORE_CLIP_TEST) {
- left -= 1;
- right += 1;
- }
+#ifdef OUTSET_BEFORE_CLIP_TEST
+ left -= 1;
+ right += 1;
+#endif
if (left >= clip->fRight || right <= clip->fLeft)
return;
if (clip->fLeft <= left && clip->fRight >= right)