[sksg] Skip zero-width strokes

Zero-width strokes imply hairline in Skia, but in other models (e.g.
Lottie) they are simply ignored.  The latter approach avoids
discontinuities when width -> 0, so let's make it the default for sksg.

TBR=
Change-Id: I957a873c0e6468e21372115ed18cc7316fd2e7d1
Reviewed-on: https://skia-review.googlesource.com/97661
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/experimental/sksg/SkSGDraw.cpp b/experimental/sksg/SkSGDraw.cpp
index 14f844a..33c73a5 100644
--- a/experimental/sksg/SkSGDraw.cpp
+++ b/experimental/sksg/SkSGDraw.cpp
@@ -26,7 +26,13 @@
 }
 
 void Draw::onRender(SkCanvas* canvas) const {
-    fGeometry->draw(canvas, fPaint->makePaint());
+    const auto& paint   = fPaint->makePaint();
+    const auto skipDraw = paint.nothingToDraw() ||
+            (paint.getStyle() == SkPaint::kStroke_Style && paint.getStrokeWidth() <= 0);
+
+    if (!skipDraw) {
+        fGeometry->draw(canvas, paint);
+    }
 }
 
 SkRect Draw::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) {