aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpAngle.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-07-07 18:09:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-07 18:09:32 -0700
commitfc95be17c3f294a86e7ba82790e38cd7ae7146eb (patch)
tree8d186a7e2dabc52bb9cd8459d307a39c0e821aa8 /src/pathops/SkOpAngle.cpp
parentf7b54cda0d44cb1e7fd89586ff8ff3b78dfb823b (diff)
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
Diffstat (limited to 'src/pathops/SkOpAngle.cpp')
-rw-r--r--src/pathops/SkOpAngle.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index 6e49c4977f..36c0dd90f7 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -182,8 +182,7 @@ int SkOpAngle::allOnOneSide(const SkOpAngle* test) {
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();