From 51041378442546711af0f5c767c8bac5a4fd757d Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 6 Dec 2017 20:07:51 +0000 Subject: Revert "keep SVG arcs axis aligned" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c3823848483eba33c3fa36187de7713e87651c1c. Reason for revert: need to add legacy flag to chrome first Original change's description: > keep SVG arcs axis aligned > > Computing the arc width introduces rounding errors that cause the > arc to exceed 1/4 circle and cause integer anchored arcs to start > outside their marks. A round rect may lose convexity as a result. > > Check if arcTo() inputs are integers and arc is 90 degrees; > if so, output conics which are axis-aligned on integers as well. > > This is triggered when using SVG to represent a round rect. > > Possible future enhancements are recorded in bug.skia.org/7383 > > R=​reed@google.com,djsollen@google.com > Change-Id: I6609456fcefabcda6c9560a044533ecb5cda2d31 > Reviewed-on: https://skia-review.googlesource.com/79423 > Reviewed-by: Derek Sollenberger > Commit-Queue: Derek Sollenberger TBR=djsollen@google.com,caryclark@google.com,reed@google.com,caryclark@skia.org Change-Id: Ia503ea62def15322df2b11da30d377a9543d6999 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/81281 Reviewed-by: Cary Clark Commit-Queue: Cary Clark --- tests/PathTest.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'tests/PathTest.cpp') diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index b36179000f..b275342e2d 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -4915,31 +4915,3 @@ DEF_TEST(NonFinitePathIteration, reporter) { REPORTER_ASSERT(reporter, verbs == 0); } - -DEF_TEST(AndroidArc, reporter) { - const char* tests[] = { - "M50,0A50,50,0,0 1 100,50 L100,85 A15,15,0,0 1 85,100 L50,100 A50,50,0,0 1 50,0z", - "M50,0L92,0 A8,8,0,0 1 100,8 L100,92 A8,8,0,0 1 92,100 L8,100" - " A8,8,0,0 1 0,92 L 0,8 A8,8,0,0 1 8,0z", - "M50 0A50 50,0,1,1,50 100A50 50,0,1,1,50 0" - }; - for (auto test : tests) { - SkPath aPath; - SkAssertResult(SkParsePath::FromSVGString(test, &aPath)); - SkASSERT(aPath.isConvex()); - for (SkScalar scale = 1; scale < 1000; scale *= 1.1f) { - SkPath scalePath = aPath; - SkMatrix matrix; - matrix.setScale(scale, scale); - scalePath.transform(matrix); - SkASSERT(scalePath.isConvex()); - } - for (SkScalar scale = 1; scale < .001; scale /= 1.1f) { - SkPath scalePath = aPath; - SkMatrix matrix; - matrix.setScale(scale, scale); - scalePath.transform(matrix); - SkASSERT(scalePath.isConvex()); - } - } -} -- cgit v1.2.3