зеркало из https://github.com/mozilla/moz-skia.git
shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@4119 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
a3f05facab
Коммит
f25edfeac7
|
@ -2292,7 +2292,7 @@ static SkScalar adjustCoincident(SkTDArray<ActiveEdge*>& edgeList,
|
|||
ActiveEdge* activePtr, * nextPtr = edgeList[0];
|
||||
size_t index;
|
||||
bool foundCoincident = false;
|
||||
int firstIndex = 0;
|
||||
size_t firstIndex = 0;
|
||||
for (index = 1; index < edgeCount; ++index) {
|
||||
activePtr = nextPtr;
|
||||
nextPtr = edgeList[index];
|
||||
|
|
|
@ -54,8 +54,8 @@ static const Quadratic testSet[] = {
|
|||
const size_t testSetCount = sizeof(testSet) / sizeof(testSet[0]);
|
||||
|
||||
static void oneOffTest() {
|
||||
for (int outer = 0; outer < testSetCount - 1; ++outer) {
|
||||
for (int inner = outer + 1; inner < testSetCount; ++inner) {
|
||||
for (size_t outer = 0; outer < testSetCount - 1; ++outer) {
|
||||
for (size_t inner = outer + 1; inner < testSetCount; ++inner) {
|
||||
const Quadratic& quad1 = testSet[outer];
|
||||
const Quadratic& quad2 = testSet[inner];
|
||||
Intersections intersections;
|
||||
|
|
|
@ -14,7 +14,7 @@ static const size_t testSetCount = sizeof(testSet) / sizeof(testSet[0]);
|
|||
|
||||
static void oneOffTest() {
|
||||
SkDebugf("%s FLT_EPSILON=%1.9g\n", __FUNCTION__, FLT_EPSILON);
|
||||
for (int index = 0; index < testSetCount; ++index) {
|
||||
for (size_t index = 0; index < testSetCount; ++index) {
|
||||
const Quadratic& quad = testSet[index];
|
||||
Quadratic reduce;
|
||||
int order = reduceOrder(quad, reduce);
|
||||
|
|
|
@ -2145,7 +2145,7 @@ static bool addIntersectTs(Contour* test, Contour* next) {
|
|||
// see if coincidence is formed by clipping non-concident segments
|
||||
static void coincidenceCheck(SkTDArray<Contour*>& contourList, int winding) {
|
||||
int contourCount = contourList.count();
|
||||
for (size_t cIndex = 0; cIndex < contourCount; ++cIndex) {
|
||||
for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
|
||||
Contour* contour = contourList[cIndex];
|
||||
contour->findTooCloseToCall(winding);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ static const SkPoint cubics[][4] = {
|
|||
static const size_t cubicCount = sizeof(cubics) / sizeof(cubics[0]);
|
||||
static const size_t testCount = lineCount + quadCount + cubicCount;
|
||||
|
||||
static SkPath::Verb setPath(int outer, SkPath& path, const SkPoint*& pts1) {
|
||||
static SkPath::Verb setPath(size_t outer, SkPath& path, const SkPoint*& pts1) {
|
||||
SkPath::Verb c1Type;
|
||||
if (outer < lineCount) {
|
||||
path.moveTo(lines[outer][0].fX, lines[outer][0].fY);
|
||||
|
@ -105,8 +105,8 @@ static void testPath(const SkPath& path, const SkPoint* pts1, SkPath::Verb c1Typ
|
|||
#endif
|
||||
}
|
||||
|
||||
static const int firstO = 6;
|
||||
static const int firstI = 1;
|
||||
static const size_t firstO = 6;
|
||||
static const size_t firstI = 1;
|
||||
|
||||
void SimplifyAddIntersectingTs_Test() {
|
||||
const SkPoint* pts1, * pts2;
|
||||
|
@ -117,10 +117,10 @@ void SimplifyAddIntersectingTs_Test() {
|
|||
SkPath::Verb c2Type = setPath(firstI, path2, pts2);
|
||||
testPath(path2, pts1, c1Type, pts2, c2Type);
|
||||
}
|
||||
for (int o = 0; o < testCount; ++o) {
|
||||
for (size_t o = 0; o < testCount; ++o) {
|
||||
SkPath path;
|
||||
SkPath::Verb c1Type = setPath(o, path, pts1);
|
||||
for (int i = 0; i < testCount; ++i) {
|
||||
for (size_t i = 0; i < testCount; ++i) {
|
||||
SkPath path2(path);
|
||||
SkPath::Verb c2Type = setPath(i, path2, pts2);
|
||||
testPath(path2, pts1, c1Type, pts2, c2Type);
|
||||
|
|
|
@ -125,7 +125,7 @@ static void testQuads(bool testFlat) {
|
|||
*angleList[x] < *angleList[x + 1];
|
||||
SkASSERT(x == quadCount - 1 || *angleList[x] < *angleList[x + 1]);
|
||||
const SimplifyAngleTest::Angle* angle = angleList[x];
|
||||
if (x != angle->start()) {
|
||||
if ((int) x != angle->start()) {
|
||||
SkDebugf("%s [%d] [%d]\n", __FUNCTION__, x, angle->start());
|
||||
SkASSERT(0);
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ static void testCubics(bool testFlat) {
|
|||
QSort<SimplifyAngleTest::Angle>(angleList.begin(), angleList.end() - 1);
|
||||
for (size_t x = 0; x < cubicCount; ++x) {
|
||||
const SimplifyAngleTest::Angle* angle = angleList[x];
|
||||
if (x != angle->start()) {
|
||||
if ((int) x != angle->start()) {
|
||||
SkDebugf("%s [%d] [%d]\n", __FUNCTION__, x, angle->start());
|
||||
SkASSERT(0);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче