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 #ifndef SkOpSegment_DEFINE | 7 #ifndef SkOpSegment_DEFINE |
8 #define SkOpSegment_DEFINE | 8 #define SkOpSegment_DEFINE |
9 | 9 |
10 #include "SkOpAngle.h" | 10 #include "SkOpAngle.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 SkOpAngle* addEndSpan() { | 67 SkOpAngle* addEndSpan() { |
68 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(this->globalState
()->allocator()); | 68 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(this->globalState
()->allocator()); |
69 angle->set(&fTail, fTail.prev()); | 69 angle->set(&fTail, fTail.prev()); |
70 fTail.setFromAngle(angle); | 70 fTail.setFromAngle(angle); |
71 return angle; | 71 return angle; |
72 } | 72 } |
73 | 73 |
74 bool addExpanded(double newT, const SkOpSpanBase* test, bool* startOver); | 74 bool addExpanded(double newT, const SkOpSpanBase* test, bool* startOver); |
75 | 75 |
76 SkOpSegment* addLine(SkPoint pts[2], SkOpContour* parent) { | 76 SkOpSegment* addLine(SkPoint pts[2], SkOpContour* parent) { |
| 77 SkASSERT(pts[0] != pts[1]); |
77 init(pts, 1, parent, SkPath::kLine_Verb); | 78 init(pts, 1, parent, SkPath::kLine_Verb); |
78 fBounds.set(pts, 2); | 79 fBounds.set(pts, 2); |
79 return this; | 80 return this; |
80 } | 81 } |
81 | 82 |
82 SkOpPtT* addMissing(double t, SkOpSegment* opp, bool* allExist); | 83 SkOpPtT* addMissing(double t, SkOpSegment* opp, bool* allExist); |
83 | 84 |
84 SkOpAngle* addStartSpan() { | 85 SkOpAngle* addStartSpan() { |
85 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(this->globalState
()->allocator()); | 86 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(this->globalState
()->allocator()); |
86 angle->set(&fHead, fHead.next()); | 87 angle->set(&fHead, fHead.next()); |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 int fDoneCount; // number of processed spans (zero initially) | 440 int fDoneCount; // number of processed spans (zero initially) |
440 SkPath::Verb fVerb; | 441 SkPath::Verb fVerb; |
441 bool fVisited; // used by missing coincidence check | 442 bool fVisited; // used by missing coincidence check |
442 #if DEBUG_COINCIDENCE | 443 #if DEBUG_COINCIDENCE |
443 mutable bool fDebugVisited; // used by debug missing coincidence check | 444 mutable bool fDebugVisited; // used by debug missing coincidence check |
444 #endif | 445 #endif |
445 SkDEBUGCODE(int fID); | 446 SkDEBUGCODE(int fID); |
446 }; | 447 }; |
447 | 448 |
448 #endif | 449 #endif |
OLD | NEW |