#include "SkRasterClip.h"
#include "SkFDot6.h"
-// Define this in your Makefile if you want the old behavior, which may draw
-// outside of the clip (but retains the old images if that is important).
-//#define SK_IGNORE_HAIRLINE_CLIP_FIX
-
/* Our attempt to compute the worst case "bounds" for the horizontal and
vertical cases has some numerical bug in it, and we sometimes undervalue
our extends. The bug is that when this happens, we will set the clip to
istart = clip->fLeft;
scaleStart = 64;
}
-#ifdef SK_IGNORE_HAIRLINE_CLIP_FIX
- if (istop > clip->fRight) {
- istop = clip->fRight;
- scaleStop = 64;
- }
-#else
if (istop > clip->fRight) {
istop = clip->fRight;
scaleStop = 0; // so we don't draw this last column
}
-#endif
+
SkASSERT(istart <= istop);
if (istart == istop) {
return;
istart = clip->fTop;
scaleStart = 64;
}
-#ifdef SK_IGNORE_HAIRLINE_CLIP_FIX
- if (istop > clip->fBottom) {
- istop = clip->fBottom;
- scaleStop = 64; // so we don't draw this last row
- }
-#else
if (istop > clip->fBottom) {
istop = clip->fBottom;
scaleStop = 0; // so we don't draw this last row
}
-#endif
+
SkASSERT(istart <= istop);
if (istart == istop)
return;