return early if we hit overflow when chopping on the left (i.e. the entire
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 19 Nov 2009 03:02:38 +0000 (03:02 +0000)
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 19 Nov 2009 03:02:38 +0000 (03:02 +0000)
segment is effectively to the left)

git-svn-id: http://skia.googlecode.com/svn/trunk@434 2bbb7eff-a529-9590-31e7-b0007b416f81

src/core/SkEdgeClipper.cpp

index 7ad845d0204a59d057d01b951ba3633b35a0e573..7c82d2250f73cd448128465032ab9ef0660788f2 100644 (file)
@@ -171,6 +171,7 @@ void SkEdgeClipper::clipMonoQuad(const SkPoint srcPts[3], const SkRect& clip) {
             // if chopMonoQuadAtY failed, then we may have hit inexact numerics
             // so we just clamp against the left
             this->appendVLine(clip.fLeft, pts[0].fY, pts[2].fY, reverse);
+            return;
         }
     }
     
@@ -354,6 +355,7 @@ void SkEdgeClipper::clipMonoCubic(const SkPoint src[4], const SkRect& clip) {
             // if chopMonocubicAtY failed, then we may have hit inexact numerics
             // so we just clamp against the left
             this->appendVLine(clip.fLeft, pts[0].fY, pts[3].fY, reverse);
+            return;
         }
     }