From 5ca4fa3846067a47e88d35ace895df3ebe3ec2a5 Mon Sep 17 00:00:00 2001 From: caryclark Date: Wed, 9 Sep 2015 09:34:22 -0700 Subject: Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reason for revert: breaks DEPS Original issue's description: > more zero-length changes for svg compatibility > > If a path contains a moveTo followed by a line or curve, > even if the line or curve has no length, SVG expects > the end caps to draw if the cap style is round or square. > > Fredrik Söderquist attached a patch to the chrome bug > (slightly modified here) that fixes layout test failures > resulting from deleting special-case code in SVG > dealing with zero-length path segments. > > R=reed@google.com,fs@opera.com > BUG=22974 > > Committed: https://skia.googlesource.com/skia/+/62fb1ba1786863e545c89839b5706ad5151cec15 TBR=fs@opera.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=22974 Review URL: https://codereview.chromium.org/1334543002 --- gm/strokes.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'gm/strokes.cpp') diff --git a/gm/strokes.cpp b/gm/strokes.cpp index e74d35f800..57517a0616 100644 --- a/gm/strokes.cpp +++ b/gm/strokes.cpp @@ -84,16 +84,12 @@ private: */ class ZeroLenStrokesGM : public skiagm::GM { SkPath fMoveHfPath, fMoveZfPath, fDashedfPath, fRefPath[4]; - SkPath fCubicPath, fQuadPath, fLinePath; protected: void onOnceBeforeDraw() override { SkAssertResult(SkParsePath::FromSVGString("M0,0h0M10,0h0M20,0h0", &fMoveHfPath)); SkAssertResult(SkParsePath::FromSVGString("M0,0zM10,0zM20,0z", &fMoveZfPath)); SkAssertResult(SkParsePath::FromSVGString("M0,0h25", &fDashedfPath)); - SkAssertResult(SkParsePath::FromSVGString("M 0 0 C 0 0 0 0 0 0", &fCubicPath)); - SkAssertResult(SkParsePath::FromSVGString("M 0 0 Q 0 0 0 0", &fQuadPath)); - SkAssertResult(SkParsePath::FromSVGString("M 0 0 L 0 0", &fLinePath)); for (int i = 0; i < 3; ++i) { fRefPath[0].addCircle(i * 10.f, 0, 5); @@ -144,12 +140,6 @@ protected: canvas->translate(0, 30); fillPaint.setAlpha(127); canvas->drawPath(fRefPath[1 + i * 2], fillPaint); - canvas->translate(0, 30); - canvas->drawPath(fCubicPath, strokePaint); - canvas->translate(0, 30); - canvas->drawPath(fQuadPath, strokePaint); - canvas->translate(0, 30); - canvas->drawPath(fLinePath, strokePaint); canvas->restore(); } } -- cgit v1.2.3