From 291932e8e42e0556bfef9118231b4ac364ecf5df Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Wed, 29 Mar 2017 14:37:28 -0400 Subject: Fix is_convex() check for inset polys. Change-Id: I1a8a24132b0cf9eb80dd586bf2f1b930adb7b582 Reviewed-on: https://skia-review.googlesource.com/10525 Reviewed-by: Greg Daniel Commit-Queue: Jim Van Verth --- tests/InsetConvexPolyTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/InsetConvexPolyTest.cpp') 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& 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; } } -- cgit v1.2.3