Lines Matching refs:angles
40 // note that this follows the same logic flow as build angles
41 bool SkOpSegment::activeAngle(int index, int* done, SkTArray<SkOpAngle, true>* angles) {
42 if (activeAngleInner(index, done, angles)) {
49 if (activeAngleOther(lesser, done, angles)) {
54 if (activeAngleOther(index, done, angles)) {
68 bool SkOpSegment::activeAngleOther(int index, int* done, SkTArray<SkOpAngle, true>* angles) {
72 return other->activeAngleInner(oIndex, done, angles);
75 bool SkOpSegment::activeAngleInner(int index, int* done, SkTArray<SkOpAngle, true>* angles) {
80 addAngle(angles, index, next);
96 addAngle(angles, index, prev);
835 void SkOpSegment::addTwoAngles(int start, int end, SkTArray<SkOpAngle, true>* angles) const {
839 addAngle(angles, end, start);
846 addAngle(angles, end, tIndex);
866 bool SkOpSegment::buildAngles(int index, SkTArray<SkOpAngle, true>* angles, bool allowOpp) const {
872 buildAnglesInner(lesser, angles);
875 buildAnglesInner(index, angles);
898 void SkOpSegment::buildAnglesInner(int index, SkTArray<SkOpAngle, true>* angles) const {
914 other->addTwoAngles(next, oIndex, angles);
918 SkTArray<SkOpAngle, true>* angles, SkTArray<SkOpAngle*, true>* sorted) {
919 addTwoAngles(startIndex, endIndex, angles);
920 if (!buildAngles(endIndex, angles, includeType == SkOpAngle::kBinaryOpp)) {
923 int angleCount = angles->count();
928 const SkOpAngle& angle = (*angles)[firstIndex];
937 bool sortable = SortAngles2(*angles, sorted);
949 // if all angles have a computed winding,
950 // or if no adjacent angles are orderable,
951 // or if adjacent orderable angles have no computed winding,
953 // if two orderable angles are adjacent, and one has winding computed, transfer to the other
1522 // more than one viable candidate -- measure angles to find best
1523 SkSTArray<SkOpAngle::kStackBasedCount, SkOpAngle, true> angles;
1527 int calcWinding = computeSum(startIndex, end, SkOpAngle::kBinaryOpp, &angles, &sorted);
1534 int angleCount = angles.count();
1653 // more than one viable candidate -- measure angles to find best
1654 SkSTArray<SkOpAngle::kStackBasedCount, SkOpAngle, true> angles;
1658 int calcWinding = computeSum(startIndex, end, SkOpAngle::kUnaryWinding, &angles, &sorted);
1660 int angleCount = angles.count();
1782 SkSTArray<SkOpAngle::kStackBasedCount, SkOpAngle, true> angles;
1786 int calcWinding = computeSum(startIndex, end, SkOpAngle::kUnaryXor, &angles, &sorted);
1788 int angleCount = angles.count();
1905 SkSTArray<SkOpAngle::kStackBasedCount, SkOpAngle, true> angles;
1907 addTwoAngles(end, firstT, &angles);
1908 if (!buildAngles(firstT, &angles, true) && onlySortable) {
1913 bool sortable = SortAngles(angles, &sorted, SkOpSegment::kMayBeUnordered_SortAngleKind);
2644 bool SkOpSegment::SortAngles(const SkTArray<SkOpAngle, true>& angles,
2648 int angleCount = angles.count();
2651 const SkOpAngle& angle = angles[angleIndex];
2662 if (angles[angleIndex].unsortable() || (orderKind == kMustBeOrdered_SortAngleKind
2663 && angles[angleIndex].unorderable())) {
2671 const SkOpAngle& angle = angles[angleIndex];
2678 // set segments to unsortable if angle is unsortable, but do not set all angles
2681 // perhaps some classes of unsortable angles should make all shared angles unsortable, but
2683 // OPTIMIZATION: check earlier when angles are added to input if any are unsortable
2686 bool SkOpSegment::SortAngles2(const SkTArray<SkOpAngle, true>& angles,
2688 int angleCount = angles.count();
2691 const SkOpAngle& angle = angles[angleIndex];
2701 // at this point angles are sorted but individually may not be orderable
3109 void SkOpSegment::debugShowSort(const char* fun, const SkTArray<SkOpAngle*, true>& angles,
3116 if (angles.count() == 0) {
3123 SkASSERT(angles[first]->segment() == this);
3124 SkASSERT(!sortable || angles.count() > 1);
3127 const SkOpAngle* firstAngle = angles[first];
3137 contourWindingStr, oppContourWindingStr, spanSign(angles[first]));
3141 const SkOpAngle& angle = *angles[index];
3218 if (index == angles.count()) {
3227 void SkOpSegment::debugShowSort(const char* fun, const SkTArray<SkOpAngle*, true>& angles,
3230 if (angles.count() == 0) {
3237 const SkOpAngle* firstAngle = angles[first];
3241 debugShowSort(fun, angles, first, winding, oppWinding, sortable);