From 2aa64758875c57a7424734b57bd206247bedc1eb Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Mon, 8 Oct 2018 13:20:17 -0400 Subject: [PATCH] modify gm to avoid creating t-junctions between degernate curves and lines Bug: skia:8453 Change-Id: Id9d4d2d02eb9db4d9af1832e506b3b39a507fe32 Reviewed-on: https://skia-review.googlesource.com/c/160460 Reviewed-by: Robert Phillips Commit-Queue: Mike Reed --- gm/mandoline.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gm/mandoline.cpp b/gm/mandoline.cpp index aef0a6801e..2a024dd900 100644 --- a/gm/mandoline.cpp +++ b/gm/mandoline.cpp @@ -43,8 +43,6 @@ public: } float T = this->chooseChopT(numSubdivisions); if (0 == T) { - fPath.lineTo(fLastPt); - this->sliceLine(pt, numSubdivisions - 1); return; } SkPoint midpt = fLastPt * (1 - T) + pt * T; @@ -63,8 +61,6 @@ public: } float T = this->chooseChopT(numSubdivisions); if (0 == T) { - fPath.quadTo(fLastPt, fLastPt); - this->sliceQuadratic(p1, p2, numSubdivisions - 1); return; } SkPoint P[3] = {fLastPt, p1, p2}, PP[5]; @@ -85,8 +81,6 @@ public: } float T = this->chooseChopT(numSubdivisions); if (0 == T) { - fPath.cubicTo(fLastPt, fLastPt, fLastPt); - this->sliceCubic(p1, p2, p3, numSubdivisions - 1); return; } SkPoint P[4] = {fLastPt, p1, p2, p3}, PP[7]; @@ -106,8 +100,6 @@ public: } float T = this->chooseChopT(numSubdivisions); if (0 == T) { - fPath.conicTo(fLastPt, fLastPt, w); - this->sliceConic(p1, p2, w, numSubdivisions - 1); return; } SkConic conic(fLastPt, p1, p2, w), halves[2];