Exclude AALinearizingConvexPathRenderer from zero size paths
Per SVG, stroking a zero length line with square or round caps should draw
a square or circle. This path renderer has lots of baked in assumptions
that prevent that behavior, so the easy solution is to let some other path
renderer handle it.
Bug: skia:6781
Change-Id: I9d2da94f75d96554e3cd218848aa552f63add679
Reviewed-on: https://skia-review.googlesource.com/20900
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index 1ffb91f..ec8013c 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -48,6 +48,10 @@
if (args.fShape->inverseFilled()) {
return false;
}
+ if (args.fShape->bounds().width() <= 0 && args.fShape->bounds().height() <= 0) {
+ // Stroked zero length lines should draw, but this PR doesn't handle that case
+ return false;
+ }
const SkStrokeRec& stroke = args.fShape->style().strokeRec();
if (stroke.getStyle() == SkStrokeRec::kStroke_Style ||