Index: src/core/SkEdgeClipper.cpp |
diff --git a/src/core/SkEdgeClipper.cpp b/src/core/SkEdgeClipper.cpp |
index 32277bcf8e3cc89064dc834a07add63efc6558f0..2b3bf073b174129a78050e70bc63714baabf16db 100644 |
--- a/src/core/SkEdgeClipper.cpp |
+++ b/src/core/SkEdgeClipper.cpp |
@@ -267,9 +267,11 @@ static bool chopMonoCubicAt(SkScalar c0, SkScalar c1, SkScalar c2, SkScalar c3, |
return true; |
} |
+#if 0 |
static bool chopMonoCubicAtY(SkPoint pts[4], SkScalar y, SkScalar* t) { |
return chopMonoCubicAt(pts[0].fY, pts[1].fY, pts[2].fY, pts[3].fY, y, t); |
} |
+#endif |
static bool chopMonoCubicAtX(SkPoint pts[4], SkScalar x, SkScalar* t) { |
return chopMonoCubicAt(pts[0].fX, pts[1].fX, pts[2].fX, pts[3].fX, x, t); |
@@ -280,17 +282,20 @@ static void chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) { |
// are we partially above |
if (pts[0].fY < clip.fTop) { |
+ SkPoint tmp[7]; |
+#if 0 |
SkScalar t; |
if (chopMonoCubicAtY(pts, clip.fTop, &t)) { |
- SkPoint tmp[7]; |
SkChopCubicAt(pts, tmp, t); |
- |
+#else |
+ if (SkChopMonoCubicAtY(pts, clip.fTop, tmp)) { |
+#endif |
// tmp[3, 4, 5].fY should all be to the below clip.fTop. |
// Since we can't trust the numerics of |
// the chopper, we force those conditions now |
tmp[3].fY = clip.fTop; |
clamp_ge(tmp[4].fY, clip.fTop); |
- clamp_ge(tmp[5].fY, clip.fTop); |
+ // clamp_ge(tmp[5].fY, clip.fTop); |
pts[0] = tmp[3]; |
pts[1] = tmp[4]; |
@@ -306,10 +311,14 @@ static void chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) { |
// are we partially below |
if (pts[3].fY > clip.fBottom) { |
+ SkPoint tmp[7]; |
+#if 0 |
SkScalar t; |
if (chopMonoCubicAtY(pts, clip.fBottom, &t)) { |
- SkPoint tmp[7]; |
SkChopCubicAt(pts, tmp, t); |
+#else |
+ if (SkChopMonoCubicAtY(pts, clip.fBottom, tmp)) { |
+#endif |
tmp[3].fY = clip.fBottom; |
clamp_le(tmp[2].fY, clip.fBottom); |