OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkChunkAlloc.h" | 8 #include "SkChunkAlloc.h" |
9 #include "SkPathOpsBounds.h" | 9 #include "SkPathOpsBounds.h" |
10 #include "SkPathOpsRect.h" | 10 #include "SkPathOpsRect.h" |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 result = fDeleted; | 803 result = fDeleted; |
804 result->reset(); | 804 result->reset(); |
805 fDeleted = result->fNext; | 805 fDeleted = result->fNext; |
806 } else { | 806 } else { |
807 result = SkNEW_PLACEMENT(fHeap.allocThrow(sizeof(SkTSpan<TCurve>)), SkTS
pan<TCurve>); | 807 result = SkNEW_PLACEMENT(fHeap.allocThrow(sizeof(SkTSpan<TCurve>)), SkTS
pan<TCurve>); |
808 result->fBounded = NULL; | 808 result->fBounded = NULL; |
809 #if DEBUG_T_SECT | 809 #if DEBUG_T_SECT |
810 ++fDebugAllocatedCount; | 810 ++fDebugAllocatedCount; |
811 #endif | 811 #endif |
812 } | 812 } |
| 813 result->fHasPerp = false; |
| 814 result->fDeleted = false; |
813 ++fActiveCount; | 815 ++fActiveCount; |
814 PATH_OPS_DEBUG_T_SECT_CODE(result->fID = fDebugCount++ * 2 + fID); | 816 PATH_OPS_DEBUG_T_SECT_CODE(result->fID = fDebugCount++ * 2 + fID); |
815 PATH_OPS_DEBUG_CODE(result->fDebugSect = this); | 817 PATH_OPS_DEBUG_CODE(result->fDebugSect = this); |
816 return result; | 818 return result; |
817 } | 819 } |
818 | 820 |
819 template<typename TCurve> | 821 template<typename TCurve> |
820 bool SkTSect<TCurve>::binarySearchCoin(SkTSect* sect2, double tStart, double tSt
ep, | 822 bool SkTSect<TCurve>::binarySearchCoin(SkTSect* sect2, double tStart, double tSt
ep, |
821 double* resultT, double* oppT) { | 823 double* resultT, double* oppT) { |
822 SkTSpan<TCurve> work; | 824 SkTSpan<TCurve> work; |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1947 } else if (intersections->isCoincident(index + 1)) { | 1949 } else if (intersections->isCoincident(index + 1)) { |
1948 intersections->removeOne(index + 1); | 1950 intersections->removeOne(index + 1); |
1949 --last; | 1951 --last; |
1950 } else { | 1952 } else { |
1951 intersections->setCoincident(index++); | 1953 intersections->setCoincident(index++); |
1952 } | 1954 } |
1953 intersections->setCoincident(index); | 1955 intersections->setCoincident(index); |
1954 } | 1956 } |
1955 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); | 1957 SkASSERT(intersections->used() <= TCurve::kMaxIntersections); |
1956 } | 1958 } |
OLD | NEW |