| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrTessellator.h" | 8 #include "GrTessellator.h" |
| 9 | 9 |
| 10 #include "GrPathUtils.h" | 10 #include "GrPathUtils.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 fTail->addEdge(e); | 428 fTail->addEdge(e); |
| 429 fCount++; | 429 fCount++; |
| 430 if (partner) { | 430 if (partner) { |
| 431 partner->addEdge(e, side, alloc); | 431 partner->addEdge(e, side, alloc); |
| 432 poly = partner; | 432 poly = partner; |
| 433 } else { | 433 } else { |
| 434 MonotonePoly* m = ALLOC_NEW(MonotonePoly, (e, side), alloc); | 434 MonotonePoly* m = ALLOC_NEW(MonotonePoly, (e, side), alloc); |
| 435 m->fPrev = fTail; | 435 m->fPrev = fTail; |
| 436 fTail->fNext = m; | 436 fTail->fNext = m; |
| 437 fTail = m; | 437 fTail = m; |
| 438 fCount += 2; | |
| 439 } | 438 } |
| 440 } | 439 } |
| 441 return poly; | 440 return poly; |
| 442 } | 441 } |
| 443 SkPoint* emit(SkPoint *data) { | 442 SkPoint* emit(SkPoint *data) { |
| 444 if (fCount < 3) { | 443 if (fCount < 3) { |
| 445 return data; | 444 return data; |
| 446 } | 445 } |
| 447 LOG("emit() %d, size %d\n", fID, fCount); | 446 LOG("emit() %d, size %d\n", fID, fCount); |
| 448 for (MonotonePoly* m = fHead; m != nullptr; m = m->fNext) { | 447 for (MonotonePoly* m = fHead; m != nullptr; m = m->fNext) { |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 } | 1440 } |
| 1442 } | 1441 } |
| 1443 int actualCount = static_cast<int>(vertsEnd - *verts); | 1442 int actualCount = static_cast<int>(vertsEnd - *verts); |
| 1444 SkASSERT(actualCount <= count); | 1443 SkASSERT(actualCount <= count); |
| 1445 SkASSERT(pointsEnd - points == actualCount); | 1444 SkASSERT(pointsEnd - points == actualCount); |
| 1446 delete[] points; | 1445 delete[] points; |
| 1447 return actualCount; | 1446 return actualCount; |
| 1448 } | 1447 } |
| 1449 | 1448 |
| 1450 } // namespace | 1449 } // namespace |
| OLD | NEW |