From 8664a1d7d719153e8e854ff0112519d92916cfe2 Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Thu, 28 Jun 2018 16:26:50 -0400 Subject: Add ear-clipping code to triangulate simple polygons. Use this to fill concave shadows. Bug: skia:7971 Change-Id: I63dc1ed845f9fa3fcd86f1ad13b03da23cae0313 Reviewed-on: https://skia-review.googlesource.com/135200 Commit-Queue: Jim Van Verth Reviewed-by: Robert Phillips --- tests/OffsetSimplePolyTest.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/OffsetSimplePolyTest.cpp') diff --git a/tests/OffsetSimplePolyTest.cpp b/tests/OffsetSimplePolyTest.cpp index de720b5cf2..547dc9e529 100644 --- a/tests/OffsetSimplePolyTest.cpp +++ b/tests/OffsetSimplePolyTest.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ #include "Test.h" -#include "SkOffsetPolygon.h" +#include "SkPolyUtils.h" static bool is_convex(const SkTDArray& poly) { if (poly.count() < 3) { @@ -200,10 +200,7 @@ DEF_TEST(OffsetSimplePoly, reporter) { *intersectingPoly.push() = SkPoint::Make(-43.30f, -25.0f); *intersectingPoly.push() = SkPoint::Make(-14.43f, -25.0f); - result = SkOffsetSimplePolygon(&intersectingPoly[0], intersectingPoly.count(), -100, - &offsetPoly); + // SkOffsetSimplePolygon now assumes that the input is simple, so we'll just check for that + result = SkIsSimplePolygon(&intersectingPoly[0], intersectingPoly.count()); REPORTER_ASSERT(reporter, !result); - - - } -- cgit v1.2.3