Index: src/pathops/SkReduceOrder.cpp |
diff --git a/src/pathops/SkReduceOrder.cpp b/src/pathops/SkReduceOrder.cpp |
index 6f06447a4715f5009d4241432e6ffba41d3dbb12..c19cd3db4b0475ee2318a218657c2a4555fc37d9 100644 |
--- a/src/pathops/SkReduceOrder.cpp |
+++ b/src/pathops/SkReduceOrder.cpp |
@@ -272,6 +272,11 @@ SkPath::Verb SkReduceOrder::Quad(const SkPoint a[3], SkPoint* reducePts) { |
} |
SkPath::Verb SkReduceOrder::Cubic(const SkPoint a[4], SkPoint* reducePts) { |
+ if (SkDPoint::ApproximatelyEqual(a[0], a[1]) && SkDPoint::ApproximatelyEqual(a[0], a[2]) |
+ && SkDPoint::ApproximatelyEqual(a[0], a[3])) { |
+ reducePts[0] = a[0]; |
+ return SkPath::kMove_Verb; |
+ } |
SkDCubic cubic; |
cubic.set(a); |
SkReduceOrder reducer; |