diff options
author | Jim Van Verth <jvanverth@google.com> | 2017-03-29 14:37:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-29 19:32:34 +0000 |
commit | 291932e8e42e0556bfef9118231b4ac364ecf5df (patch) | |
tree | d1f82616486737dfad588bb7b821249940611fce /tests/InsetConvexPolyTest.cpp | |
parent | 1c6025cc9da4a4f3a8ad16dde2ae8dcf120ed270 (diff) |
Fix is_convex() check for inset polys.
Change-Id: I1a8a24132b0cf9eb80dd586bf2f1b930adb7b582
Reviewed-on: https://skia-review.googlesource.com/10525
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'tests/InsetConvexPolyTest.cpp')
-rw-r--r-- | tests/InsetConvexPolyTest.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/InsetConvexPolyTest.cpp b/tests/InsetConvexPolyTest.cpp index e13a25a70f..5376789943 100644 --- a/tests/InsetConvexPolyTest.cpp +++ b/tests/InsetConvexPolyTest.cpp @@ -23,8 +23,7 @@ static bool is_convex(const SkTDArray<SkPoint>& poly) { SkVector v0 = poly[j] - poly[i]; SkVector v1 = poly[k] - poly[i]; SkScalar perpDot = v0.cross(v1); - int side = winding*perpDot; - if (side < 0) { + if (winding*perpDot < 0) { return false; } } |