15#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
21 uint16_t indexMap[1024];
22 for (
int i = 0;
i < 1024; ++
i) {
38 poly[2].set(102.5f, 55.330127f);
42 triangleIndices.
clear();
47 poly[2].set(100 + 2.5f, 55);
52 triangleIndices.
clear();
57 poly[0].set(-1.0e+37f, 1.0e+37f);
58 poly[1].set(1.0e+37f, 1.0e+37f);
59 poly[2].set(-1.0e+37f, -1.0e+37f);
63 triangleIndices.
clear();
68 poly[0].set(-1.0e-38f, 1.0e-38f);
69 poly[1].set(-1.0e-38f, -1.0e-38f);
70 poly[2].set(1.0e-38f, 1.0e-38f);
75 triangleIndices.
clear();
80 poly[0].set(-100 + 1.0e+9f, 55 - 1.0e+9f);
81 poly[1].set(100 + 1.0e+9f, 55 - 1.0e+9f);
82 poly[2].set(150 + 1.0e+9f, 100 - 1.0e+9f);
86 triangleIndices.
clear();
116 triangleIndices.
clear();
121 for (
int i = 0;
i < poly.
size(); ++
i) {
122 poly[
i].offset(1.0e+7f, 1.0e+7f);
128 triangleIndices.
clear();
133 for (
int i = 0;
i < poly.
size(); ++
i) {
134 poly[
i].offset(4.0e+7f, 4.0e+7f);
140 triangleIndices.
clear();
176 triangleIndices.
clear();
197 triangleIndices.
clear();
210 for (
int i = 0;
i < n;
i++) {
219 triangleIndices.
clear();
241 triangleIndices.
clear();
258 triangleIndices.
clear();
274 triangleIndices.
clear();
383 *poly.
append() =
SkPoint::Make(-44882437151680690189392273689542656.0000f, 134217728.0000f);
417 triangleIndices.
clear();
DEF_TEST(PolyUtils, reporter)
bool SkIsConvexPolygon(const SkPoint *polygonVerts, int polygonSize)
bool SkTriangulateSimplePolygon(const SkPoint *polygonVerts, uint16_t *indexMap, int polygonSize, SkTDArray< uint16_t > *triangleIndices)
bool SkIsSimplePolygon(const SkPoint *polygon, int polygonSize)
int SkGetPolygonWinding(const SkPoint *polygonVerts, int polygonSize)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
#define REPORTER_ASSERT(r, cond,...)
static constexpr SkPoint Make(float x, float y)