fix pathops battle test
The intermediate subtraction threw away bits causing
the subsequent cross product to fail. Defer the
bit truncation until after the vector is computed.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1226933003
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index 6e49c49..36c0dd9 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -182,8 +182,7 @@
int lineStart = fStart->t() < fEnd->t() ? 0 : 1;
line = linePts[lineStart ^ 1] - linePts[lineStart];
} else {
- SkPoint shortPts[2] = { fCurvePart[0].asSkPoint(), fCurvePart[1].asSkPoint() };
- line = shortPts[1] - shortPts[0];
+ line = (fCurvePart[1] - fCurvePart[0]).asSkVector();
}
float crosses[3];
SkPath::Verb testVerb = test->segment()->verb();