aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/strokes.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-09-09 09:34:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-09 09:34:22 -0700
commit5ca4fa3846067a47e88d35ace895df3ebe3ec2a5 (patch)
treeba745ddb320f96a452ff6a9984d9559ad2632acf /gm/strokes.cpp
parent6c59d80858f453a426df9b07fdf3a8cc01e0b906 (diff)
Revert of more zero-length changes for svg compatibility (patchset #6 id:100001 of https://codereview.chromium.org/1330623003/ )
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
Diffstat (limited to 'gm/strokes.cpp')
-rw-r--r--gm/strokes.cpp10
1 files changed, 0 insertions, 10 deletions
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();
}
}