OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "SkOpCoincidence.h" | 7 #include "SkOpCoincidence.h" |
8 #include "SkOpContour.h" | 8 #include "SkOpContour.h" |
9 #include "SkOpSegment.h" | 9 #include "SkOpSegment.h" |
10 #include "SkPathWriter.h" | 10 #include "SkPathWriter.h" |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 spanBase = spanBase->upCast()->next(); | 534 spanBase = spanBase->upCast()->next(); |
535 } while (true); | 535 } while (true); |
536 return false; | 536 return false; |
537 } | 537 } |
538 | 538 |
539 void SkOpSegment::release(const SkOpSpan* span) { | 539 void SkOpSegment::release(const SkOpSpan* span) { |
540 if (span->done()) { | 540 if (span->done()) { |
541 --fDoneCount; | 541 --fDoneCount; |
542 } | 542 } |
543 --fCount; | 543 --fCount; |
544 SkASSERT(this->globalState()->debugSkipAssert() || fCount >= fDoneCount); | 544 SkOPASSERT(fCount >= fDoneCount); |
545 } | 545 } |
546 | 546 |
547 double SkOpSegment::distSq(double t, const SkOpAngle* oppAngle) const { | 547 double SkOpSegment::distSq(double t, const SkOpAngle* oppAngle) const { |
548 SkDPoint testPt = this->dPtAtT(t); | 548 SkDPoint testPt = this->dPtAtT(t); |
549 SkDLine testPerp = {{ testPt, testPt }}; | 549 SkDLine testPerp = {{ testPt, testPt }}; |
550 SkDVector slope = this->dSlopeAtT(t); | 550 SkDVector slope = this->dSlopeAtT(t); |
551 testPerp[1].fX += slope.fY; | 551 testPerp[1].fX += slope.fY; |
552 testPerp[1].fY -= slope.fX; | 552 testPerp[1].fY -= slope.fX; |
553 SkIntersections i; | 553 SkIntersections i; |
554 const SkOpSegment* oppSegment = oppAngle->segment(); | 554 const SkOpSegment* oppSegment = oppAngle->segment(); |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 int absOut = SkTAbs(outerWinding); | 1804 int absOut = SkTAbs(outerWinding); |
1805 int absIn = SkTAbs(innerWinding); | 1805 int absIn = SkTAbs(innerWinding); |
1806 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; | 1806 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; |
1807 return result; | 1807 return result; |
1808 } | 1808 } |
1809 | 1809 |
1810 int SkOpSegment::windSum(const SkOpAngle* angle) const { | 1810 int SkOpSegment::windSum(const SkOpAngle* angle) const { |
1811 const SkOpSpan* minSpan = angle->start()->starter(angle->end()); | 1811 const SkOpSpan* minSpan = angle->start()->starter(angle->end()); |
1812 return minSpan->windSum(); | 1812 return minSpan->windSum(); |
1813 } | 1813 } |
OLD | NEW |