Fix GrAAConvexTessellator colinear point removal.

We weren't checking whether the new point in lineTo was backtracking or not.

Also:
Replace distance-to-line check with triangle area check. The previous check
was asymmetric. Given point sequence (a, b, c) it might make a different
decision than when given (c, b, a).

Compute normals late since we don't use them to detect colinear edges
anymore.

Rename SkPointPriv::SetOrhog -> SkPointPriv::MakeOrthog and return
computed value rather than take SkPoint* dst.

Bug: chromium:869172


Change-Id: I8da53edf1a2e6098f4199da57368ebb644866e4c
Reviewed-on: https://skia-review.googlesource.com/150682
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index e9a612f..0f81897 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -147,7 +147,7 @@
         for (int p = 0; p < n; ++p) {
             segb.fNorms[p] = segb.fPts[p] - *prevPt;
             segb.fNorms[p].normalize();
-            SkPointPriv::SetOrthog(&segb.fNorms[p], segb.fNorms[p], normSide);
+            segb.fNorms[p] = SkPointPriv::MakeOrthog(segb.fNorms[p], normSide);
             prevPt = &segb.fPts[p];
         }
         if (Segment::kLine == segb.fType) {
@@ -206,7 +206,7 @@
             if (SkPointPriv::DistanceToSqd(pt, data->fFirstPoint) > kCloseSqd) {
                 data->fLineNormal = pt - data->fFirstPoint;
                 data->fLineNormal.normalize();
-                SkPointPriv::SetOrthog(&data->fLineNormal, data->fLineNormal);
+                data->fLineNormal = SkPointPriv::MakeOrthog(data->fLineNormal);
                 data->fLineC = -data->fLineNormal.dot(data->fFirstPoint);
                 data->fStage = DegenerateTestData::kLine;
             }