Disable convex check for now.
Change-Id: Icd0e14cd8183f19c96eeb9a1c46aed3d7809c29f Reviewed-on: https://skia-review.googlesource.com/10110 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
ab664fa5b5
commit
dc276f909f
@ -141,11 +141,12 @@ bool SkInsetConvexPolygon(const SkPoint* inputPolygonVerts, int inputPolygonSize
|
||||
|
||||
SkAutoSTMalloc<64, EdgeData> edgeData(inputPolygonSize);
|
||||
for (int i = 0; i < inputPolygonSize; ++i) {
|
||||
edgeData[i].fValid = true;
|
||||
int j = (i + 1) % inputPolygonSize;
|
||||
inset_edge(inputPolygonVerts[i], inputPolygonVerts[j], insetDistance, winding,
|
||||
&edgeData[i].fInset);
|
||||
edgeData[i].fIntersection = edgeData[i].fInset.fP0;
|
||||
edgeData[i].fTValue = SK_ScalarMin;
|
||||
edgeData[i].fValid = true;
|
||||
}
|
||||
|
||||
int prevIndex = inputPolygonSize - 1;
|
||||
@ -213,21 +214,21 @@ bool SkInsetConvexPolygon(const SkPoint* inputPolygonVerts, int inputPolygonSize
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
bool convex = true;
|
||||
for (int i = 0; i < insetPolygon->count(); ++i) {
|
||||
int j = (i + 1) % insetPolygon->count();
|
||||
int k = (i + 2) % insetPolygon->count();
|
||||
|
||||
int side = winding*compute_side((*insetPolygon)[i], (*insetPolygon)[j],
|
||||
(*insetPolygon)[k]);
|
||||
if (side < 0) {
|
||||
convex = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
SkASSERT(convex);
|
||||
#endif
|
||||
//#ifdef SK_DEBUG
|
||||
// bool convex = true;
|
||||
// for (int i = 0; i < insetPolygon->count(); ++i) {
|
||||
// int j = (i + 1) % insetPolygon->count();
|
||||
// int k = (i + 2) % insetPolygon->count();
|
||||
//
|
||||
// int side = winding*compute_side((*insetPolygon)[i], (*insetPolygon)[j],
|
||||
// (*insetPolygon)[k]);
|
||||
// if (side < 0) {
|
||||
// convex = false;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// SkASSERT(convex);
|
||||
//#endif
|
||||
|
||||
return (insetPolygon->count() >= 3);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user