fix pathops handling of tiny wrapback quads and cubics

If a quad or cubic reverses on itself, path ops breaks
it in two. It determines the type of curve remaining,
but needs to replace near-zero with zero first.

TBR=reed@google.com
Bug:790731
Change-Id: I3a1afa14fff064ca874b5abc768ec1ec5c2cf22f
Reviewed-on: https://skia-review.googlesource.com/79400
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
diff --git a/src/pathops/SkPathOpsCubic.cpp b/src/pathops/SkPathOpsCubic.cpp
index 5c672fa..33229fa 100644
--- a/src/pathops/SkPathOpsCubic.cpp
+++ b/src/pathops/SkPathOpsCubic.cpp
@@ -713,7 +713,10 @@
     const double* dCubic = &fPts[0].fX;
     SkScalar* cubic = &pts[0].fX;
     for (int index = 0; index < kPointCount * 2; ++index) {
-        *cubic++ = SkDoubleToScalar(*dCubic++);
+        cubic[index] = SkDoubleToScalar(dCubic[index]);
+        if (SkScalarAbs(cubic[index]) < FLT_EPSILON_ORDERABLE_ERR) {
+            cubic[index] = 0;
+        }
     }
     return SkScalarsAreFinite(&pts->fX, kPointCount * 2);
 }