17#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
23 enum class Type { kConvexCheck, kSimpleCheck, kInsetConvex, kOffsetSimple, kTessellateSimple };
33 fName =
"poly_utils_";
60 for (
int i = 0;
i < loops;
i++) {
65 for (
int i = 0;
i < loops;
i++) {
72 for (
int i = 0;
i < loops;
i++) {
83 for (
int i = 0;
i < loops;
i++) {
94 for (
int i = 0;
i < poly.
size(); ++
i) {
98 for (
int i = 0;
i < loops;
i++) {
119 name->append(
"star");
129 for (
int i = 0;
i < n;
i++) {
145 name->append(
"circle");
154 for (
int i = 0;
i < n;
i++) {
168 name->append(
"intersecting");
179 for (
int i = 1;
i < n;
i++) {
194 name->append(
"notch");
203 for (
int i = 0;
i < n;
i++) {
219 name->append(
"icecream");
228 for (
int i = 0;
i < n;
i++) {
bool SkIsConvexPolygon(const SkPoint *polygonVerts, int polygonSize)
bool SkTriangulateSimplePolygon(const SkPoint *polygonVerts, uint16_t *indexMap, int polygonSize, SkTDArray< uint16_t > *triangleIndices)
bool SkOffsetSimplePolygon(const SkPoint *inputPolygonVerts, int inputPolygonSize, const SkRect &bounds, SkScalar offset, SkTDArray< SkPoint > *offsetPolygon, SkTDArray< int > *polygonIndices)
bool SkIsSimplePolygon(const SkPoint *polygon, int polygonSize)
bool SkInsetConvexPolygon(const SkPoint *inputPolygonVerts, int inputPolygonSize, SkScalar inset, SkTDArray< SkPoint > *insetPolygon)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
CirclePolyUtilsBench(PolyUtilsBench::Type type)
void appendName(SkString *name) override
void makePoly(SkTDArray< SkPoint > *poly) override
IceCreamPolyUtilsBench(PolyUtilsBench::Type type)
void makePoly(SkTDArray< SkPoint > *poly) override
void appendName(SkString *name) override
IntersectingPolyUtilsBench(PolyUtilsBench::Type type)
void makePoly(SkTDArray< SkPoint > *poly) override
void appendName(SkString *name) override
void makePoly(SkTDArray< SkPoint > *poly) override
NotchPolyUtilsBench(PolyUtilsBench::Type type)
void appendName(SkString *name) override
void onDraw(int loops, SkCanvas *canvas) override
PolyUtilsBench(Type type)
virtual void makePoly(SkTDArray< SkPoint > *poly)=0
const char * onGetName() override
virtual void appendName(SkString *)=0
void append(const char text[])
const char * c_str() const
void makePoly(SkTDArray< SkPoint > *poly) override
void appendName(SkString *name) override
StarPolyUtilsBench(PolyUtilsBench::Type type)
Optional< SkRect > bounds
DEF_SWITCHES_START aot vmservice shared library name
static constexpr SkPoint Make(float x, float y)