always compute a cubic tangent

If the inflection of a cubic is also the cusp, the tangent
is degenerate at that t when computed directly. Rather than
giving up, subdivide the curve there and use the computed
control points to compute the tangent.

This strategy also removes the error paths where the tangent
formerly could not be computed.

R=reed@google.com
BUG=615686
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2020293002

Review-Url: https://codereview.chromium.org/2020293002
diff --git a/gm/bug615686.cpp b/gm/bug615686.cpp
new file mode 100644
index 0000000..bd78b1a
--- /dev/null
+++ b/gm/bug615686.cpp
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "gm.h"
+#include "SkPath.h"
+
+DEF_SIMPLE_GM(bug615686, canvas, 250, 250) {
+    SkPaint p;
+    p.setAntiAlias(true);
+    p.setStyle(SkPaint::kStroke_Style);
+    p.setStrokeWidth(20);
+    SkPath path;
+    path.moveTo(0, 0);
+    path.cubicTo(200, 200, 0, 200, 200, 0);
+    canvas->drawPath(path, p);
+}