Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: src/pathops/SkOpSegment.h

Issue 1111333002: compute initial winding from projected rays (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add missing test reference Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "SkOpSpan.h" 11 #include "SkOpSpan.h"
12 #include "SkOpTAllocator.h" 12 #include "SkOpTAllocator.h"
13 #include "SkPathOpsBounds.h" 13 #include "SkPathOpsBounds.h"
14 #include "SkPathOpsCubic.h" 14 #include "SkPathOpsCubic.h"
15 #include "SkPathOpsCurve.h" 15 #include "SkPathOpsCurve.h"
16 16
17 struct SkDCurve; 17 struct SkDCurve;
18 class SkOpCoincidence; 18 class SkOpCoincidence;
19 class SkOpContour; 19 class SkOpContour;
20 enum class SkOpRayDir;
21 struct SkOpRayHit;
20 class SkPathWriter; 22 class SkPathWriter;
21 23
22 class SkOpSegment { 24 class SkOpSegment {
23 public: 25 public:
24 enum AllowAlias { 26 enum AllowAlias {
25 kAllowAlias, 27 kAllowAlias,
26 kNoAlias 28 kNoAlias
27 }; 29 };
28 30
29 bool operator<(const SkOpSegment& rh) const { 31 bool operator<(const SkOpSegment& rh) const {
30 return fBounds.fTop < rh.fBounds.fTop; 32 return fBounds.fTop < rh.fBounds.fTop;
31 } 33 }
32 34
33 SkOpAngle* activeAngle(SkOpSpanBase* start, SkOpSpanBase** startPtr, SkOpSpa nBase** endPtr, 35 SkOpAngle* activeAngle(SkOpSpanBase* start, SkOpSpanBase** startPtr, SkOpSpa nBase** endPtr,
34 bool* done, bool* sortable); 36 bool* done, bool* sortable);
35 SkOpAngle* activeAngleInner(SkOpSpanBase* start, SkOpSpanBase** startPtr, 37 SkOpAngle* activeAngleInner(SkOpSpanBase* start, SkOpSpanBase** startPtr,
36 SkOpSpanBase** endPtr, bool* done, bool* sortable); 38 SkOpSpanBase** endPtr, bool* done, bool* sortable);
37 SkOpAngle* activeAngleOther(SkOpSpanBase* start, SkOpSpanBase** startPtr, 39 SkOpAngle* activeAngleOther(SkOpSpanBase* start, SkOpSpanBase** startPtr,
38 SkOpSpanBase** endPtr, bool* done, bool* sortable); 40 SkOpSpanBase** endPtr, bool* done, bool* sortable);
39 bool activeOp(SkOpSpanBase* start, SkOpSpanBase* end, int xorMiMask, int xor SuMask, 41 bool activeOp(SkOpSpanBase* start, SkOpSpanBase* end, int xorMiMask, int xor SuMask,
40 SkPathOp op); 42 SkPathOp op);
41 bool activeOp(int xorMiMask, int xorSuMask, SkOpSpanBase* start, SkOpSpanBas e* end, SkPathOp op, 43 bool activeOp(int xorMiMask, int xorSuMask, SkOpSpanBase* start, SkOpSpanBas e* end, SkPathOp op,
42 int* sumMiWinding, int* sumSuWinding); 44 int* sumMiWinding, int* sumSuWinding);
43 45
44 SkDPoint activeLeftTop(SkOpSpanBase** firstT);
45
46 bool activeWinding(SkOpSpanBase* start, SkOpSpanBase* end); 46 bool activeWinding(SkOpSpanBase* start, SkOpSpanBase* end);
47 bool activeWinding(SkOpSpanBase* start, SkOpSpanBase* end, int* sumWinding); 47 bool activeWinding(SkOpSpanBase* start, SkOpSpanBase* end, int* sumWinding);
48 48
49 SkOpSegment* addConic(SkPoint pts[3], SkScalar weight, SkOpContour* parent) { 49 SkOpSegment* addConic(SkPoint pts[3], SkScalar weight, SkOpContour* parent) {
50 init(pts, weight, parent, SkPath::kConic_Verb); 50 init(pts, weight, parent, SkPath::kConic_Verb);
51 SkDCurve curve; 51 SkDCurve curve;
52 curve.fConic.set(pts, weight); 52 curve.fConic.set(pts, weight);
53 curve.setConicBounds(pts, weight, 0, 1, &fBounds); 53 curve.setConicBounds(pts, weight, 0, 1, &fBounds);
54 return this; 54 return this;
55 } 55 }
(...skipping 16 matching lines...) Expand all
72 return angle; 72 return angle;
73 } 73 }
74 74
75 SkOpSegment* addLine(SkPoint pts[2], SkOpContour* parent) { 75 SkOpSegment* addLine(SkPoint pts[2], SkOpContour* parent) {
76 init(pts, 1, parent, SkPath::kLine_Verb); 76 init(pts, 1, parent, SkPath::kLine_Verb);
77 fBounds.set(pts, 2); 77 fBounds.set(pts, 2);
78 return this; 78 return this;
79 } 79 }
80 80
81 SkOpPtT* addMissing(double t, SkOpSegment* opp, SkChunkAlloc* ); 81 SkOpPtT* addMissing(double t, SkOpSegment* opp, SkChunkAlloc* );
82 SkOpAngle* addSingletonAngleDown(SkOpSegment** otherPtr, SkOpAngle** , SkChu nkAlloc* );
83 SkOpAngle* addSingletonAngles(int step, SkChunkAlloc* );
84 SkOpAngle* addSingletonAngleUp(SkOpSegment** otherPtr, SkOpAngle** , SkChunk Alloc* );
85 82
86 SkOpAngle* addStartSpan(SkChunkAlloc* allocator) { 83 SkOpAngle* addStartSpan(SkChunkAlloc* allocator) {
87 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(allocator); 84 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(allocator);
88 angle->set(&fHead, fHead.next()); 85 angle->set(&fHead, fHead.next());
89 fHead.setToAngle(angle); 86 fHead.setToAngle(angle);
90 return angle; 87 return angle;
91 } 88 }
92 89
93 SkOpSegment* addQuad(SkPoint pts[3], SkOpContour* parent) { 90 SkOpSegment* addQuad(SkPoint pts[3], SkOpContour* parent) {
94 init(pts, 1, parent, SkPath::kQuad_Verb); 91 init(pts, 1, parent, SkPath::kQuad_Verb);
95 SkDCurve curve; 92 SkDCurve curve;
96 curve.fQuad.set(pts); 93 curve.fQuad.set(pts);
97 curve.setQuadBounds(pts, 1, 0, 1, &fBounds); 94 curve.setQuadBounds(pts, 1, 0, 1, &fBounds);
98 return this; 95 return this;
99 } 96 }
100 97
101 SkOpPtT* addT(double t, AllowAlias , SkChunkAlloc* ); 98 SkOpPtT* addT(double t, AllowAlias , SkChunkAlloc* );
102 99
103 void align(); 100 void align();
104 static bool BetweenTs(const SkOpSpanBase* lesser, double testT, const SkOpSp anBase* greater);
105 101
106 const SkPathOpsBounds& bounds() const { 102 const SkPathOpsBounds& bounds() const {
107 return fBounds; 103 return fBounds;
108 } 104 }
109 105
110 void bumpCount() { 106 void bumpCount() {
111 ++fCount; 107 ++fCount;
112 } 108 }
113 109
114 void calcAngles(SkChunkAlloc*); 110 void calcAngles(SkChunkAlloc*);
115 void checkAngleCoin(SkOpCoincidence* coincidences, SkChunkAlloc* allocator); 111 void checkAngleCoin(SkOpCoincidence* coincidences, SkChunkAlloc* allocator);
116 void checkNearCoincidence(SkOpAngle* ); 112 void checkNearCoincidence(SkOpAngle* );
117 bool clockwise(const SkOpSpanBase* start, const SkOpSpanBase* end, bool* swa p) const;
118 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle, 113 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle,
119 SkOpAngle::IncludeType ); 114 SkOpAngle::IncludeType );
120 static void ComputeOneSumReverse(const SkOpAngle* baseAngle, SkOpAngle* next Angle, 115 static void ComputeOneSumReverse(SkOpAngle* baseAngle, SkOpAngle* nextAngle,
121 SkOpAngle::IncludeType ); 116 SkOpAngle::IncludeType );
122 int computeSum(SkOpSpanBase* start, SkOpSpanBase* end, SkOpAngle::IncludeTyp e includeType); 117 int computeSum(SkOpSpanBase* start, SkOpSpanBase* end, SkOpAngle::IncludeTyp e includeType);
123 118
124 SkOpContour* contour() const { 119 SkOpContour* contour() const {
125 return fContour; 120 return fContour;
126 } 121 }
127 122
128 int count() const { 123 int count() const {
129 return fCount; 124 return fCount;
130 } 125 }
131 126
132 SkOpSpan* crossedSpanY(const SkPoint& basePt, double mid, bool opp, bool cur rent,
133 SkScalar* bestY, double* hitT, bool* hitSomething, b ool* vertical);
134
135 void debugAddAngle(double startT, double endT, SkChunkAlloc*); 127 void debugAddAngle(double startT, double endT, SkChunkAlloc*);
136 const SkOpAngle* debugAngle(int id) const; 128 const SkOpAngle* debugAngle(int id) const;
137 SkOpContour* debugContour(int id); 129 SkOpContour* debugContour(int id);
138 130
139 int debugID() const { 131 int debugID() const {
140 return SkDEBUGRELEASE(fID, -1); 132 return SkDEBUGRELEASE(fID, -1);
141 } 133 }
142 134
143 #if DEBUG_SWAP_TOP
144 int debugInflections(const SkOpSpanBase* start, const SkOpSpanBase* end) con st;
145 #endif
146
147 SkOpAngle* debugLastAngle(); 135 SkOpAngle* debugLastAngle();
148 const SkOpPtT* debugPtT(int id) const; 136 const SkOpPtT* debugPtT(int id) const;
149 void debugReset(); 137 void debugReset();
150 const SkOpSegment* debugSegment(int id) const; 138 const SkOpSegment* debugSegment(int id) const;
151 139
152 #if DEBUG_ACTIVE_SPANS 140 #if DEBUG_ACTIVE_SPANS
153 void debugShowActiveSpans() const; 141 void debugShowActiveSpans() const;
154 #endif 142 #endif
155 #if DEBUG_MARK_DONE 143 #if DEBUG_MARK_DONE
156 void debugShowNewWinding(const char* fun, const SkOpSpan* span, int winding) ; 144 void debugShowNewWinding(const char* fun, const SkOpSpan* span, int winding) ;
(...skipping 20 matching lines...) Expand all
177 165
178 SkDVector dSlopeAtT(double mid) const { 166 SkDVector dSlopeAtT(double mid) const {
179 return (*CurveDSlopeAtT[fVerb])(fPts, fWeight, mid); 167 return (*CurveDSlopeAtT[fVerb])(fPts, fWeight, mid);
180 } 168 }
181 169
182 void dump() const; 170 void dump() const;
183 void dumpAll() const; 171 void dumpAll() const;
184 void dumpAngles() const; 172 void dumpAngles() const;
185 void dumpCoin() const; 173 void dumpCoin() const;
186 void dumpPts() const; 174 void dumpPts() const;
175 void dumpPtsInner() const;
187 176
188 SkOpSegment* findNextOp(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** next Start, 177 SkOpSegment* findNextOp(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** next Start,
189 SkOpSpanBase** nextEnd, bool* unsortable, SkPathOp op, 178 SkOpSpanBase** nextEnd, bool* unsortable, SkPathOp op,
190 int xorMiMask, int xorSuMask); 179 int xorMiMask, int xorSuMask);
191 SkOpSegment* findNextWinding(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** nextStart, 180 SkOpSegment* findNextWinding(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** nextStart,
192 SkOpSpanBase** nextEnd, bool* unsortable); 181 SkOpSpanBase** nextEnd, bool* unsortable);
193 SkOpSegment* findNextXor(SkOpSpanBase** nextStart, SkOpSpanBase** nextEnd, b ool* unsortable); 182 SkOpSegment* findNextXor(SkOpSpanBase** nextStart, SkOpSpanBase** nextEnd, b ool* unsortable);
194 SkOpSegment* findTop(bool firstPass, SkOpSpanBase** startPtr, SkOpSpanBase** endPtr, 183 SkOpSpan* findSortableTop(SkOpContour* );
195 bool* unsortable, SkChunkAlloc* );
196 SkOpGlobalState* globalState() const; 184 SkOpGlobalState* globalState() const;
197 185
198 const SkOpSpan* head() const { 186 const SkOpSpan* head() const {
199 return &fHead; 187 return &fHead;
200 } 188 }
201 189
202 SkOpSpan* head() { 190 SkOpSpan* head() {
203 return &fHead; 191 return &fHead;
204 } 192 }
205 193
206 void init(SkPoint pts[], SkScalar weight, SkOpContour* parent, SkPath::Verb verb); 194 void init(SkPoint pts[], SkScalar weight, SkOpContour* parent, SkPath::Verb verb);
207 void initWinding(SkOpSpanBase* start, SkOpSpanBase* end,
208 SkOpAngle::IncludeType angleIncludeType);
209 bool initWinding(SkOpSpanBase* start, SkOpSpanBase* end, double tHit, int wi nding,
210 SkScalar hitDx, int oppWind, SkScalar hitOppDx);
211 195
212 SkOpSpan* insert(SkOpSpan* prev, SkChunkAlloc* allocator) { 196 SkOpSpan* insert(SkOpSpan* prev, SkChunkAlloc* allocator) {
213 SkOpSpan* result = SkOpTAllocator<SkOpSpan>::Allocate(allocator); 197 SkOpSpan* result = SkOpTAllocator<SkOpSpan>::Allocate(allocator);
214 SkOpSpanBase* next = prev->next(); 198 SkOpSpanBase* next = prev->next();
215 result->setPrev(prev); 199 result->setPrev(prev);
216 prev->setNext(result); 200 prev->setNext(result);
217 SkDEBUGCODE(result->ptT()->fT = 0); 201 SkDEBUGCODE(result->ptT()->fT = 0);
218 result->setNext(next); 202 result->setNext(next);
219 if (next) { 203 if (next) {
220 next->setPrev(result); 204 next->setPrev(result);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 bool markAndChaseWinding(SkOpSpanBase* start, SkOpSpanBase* end, int winding , 236 bool markAndChaseWinding(SkOpSpanBase* start, SkOpSpanBase* end, int winding ,
253 int oppWinding, SkOpSpanBase** lastPtr); 237 int oppWinding, SkOpSpanBase** lastPtr);
254 SkOpSpanBase* markAngle(int maxWinding, int sumWinding, const SkOpAngle* ang le); 238 SkOpSpanBase* markAngle(int maxWinding, int sumWinding, const SkOpAngle* ang le);
255 SkOpSpanBase* markAngle(int maxWinding, int sumWinding, int oppMaxWinding, i nt oppSumWinding, 239 SkOpSpanBase* markAngle(int maxWinding, int sumWinding, int oppMaxWinding, i nt oppSumWinding,
256 const SkOpAngle* angle); 240 const SkOpAngle* angle);
257 void markDone(SkOpSpan* ); 241 void markDone(SkOpSpan* );
258 bool markWinding(SkOpSpan* , int winding); 242 bool markWinding(SkOpSpan* , int winding);
259 bool markWinding(SkOpSpan* , int winding, int oppWinding); 243 bool markWinding(SkOpSpan* , int winding, int oppWinding);
260 bool match(const SkOpPtT* span, const SkOpSegment* parent, double t, const S kPoint& pt) const; 244 bool match(const SkOpPtT* span, const SkOpSegment* parent, double t, const S kPoint& pt) const;
261 void missingCoincidence(SkOpCoincidence* coincidences, SkChunkAlloc* allocat or); 245 void missingCoincidence(SkOpCoincidence* coincidences, SkChunkAlloc* allocat or);
262 bool monotonicInY(const SkOpSpanBase* start, const SkOpSpanBase* end) const;
263 void moveMultiples(); 246 void moveMultiples();
264 void moveNearby(); 247 void moveNearby();
265 248
266 SkOpSegment* next() const { 249 SkOpSegment* next() const {
267 return fNext; 250 return fNext;
268 } 251 }
269 252
270 static bool NextCandidate(SkOpSpanBase* span, SkOpSpanBase** start, SkOpSpan Base** end);
271 SkOpSegment* nextChase(SkOpSpanBase** , int* step, SkOpSpan** , SkOpSpanBase ** last) const; 253 SkOpSegment* nextChase(SkOpSpanBase** , int* step, SkOpSpan** , SkOpSpanBase ** last) const;
272 bool operand() const; 254 bool operand() const;
273 255
274 static int OppSign(const SkOpSpanBase* start, const SkOpSpanBase* end) { 256 static int OppSign(const SkOpSpanBase* start, const SkOpSpanBase* end) {
275 int result = start->t() < end->t() ? -start->upCast()->oppValue() 257 int result = start->t() < end->t() ? -start->upCast()->oppValue()
276 : end->upCast()->oppValue(); 258 : end->upCast()->oppValue();
277 return result; 259 return result;
278 } 260 }
279 261
280 bool oppXor() const; 262 bool oppXor() const;
(...skipping 13 matching lines...) Expand all
294 bool ptsDisjoint(const SkOpPtT& span, const SkOpPtT& test) const { 276 bool ptsDisjoint(const SkOpPtT& span, const SkOpPtT& test) const {
295 return ptsDisjoint(span.fT, span.fPt, test.fT, test.fPt); 277 return ptsDisjoint(span.fT, span.fPt, test.fT, test.fPt);
296 } 278 }
297 279
298 bool ptsDisjoint(const SkOpPtT& span, double t, const SkPoint& pt) const { 280 bool ptsDisjoint(const SkOpPtT& span, double t, const SkPoint& pt) const {
299 return ptsDisjoint(span.fT, span.fPt, t, pt); 281 return ptsDisjoint(span.fT, span.fPt, t, pt);
300 } 282 }
301 283
302 bool ptsDisjoint(double t1, const SkPoint& pt1, double t2, const SkPoint& pt 2) const; 284 bool ptsDisjoint(double t1, const SkPoint& pt1, double t2, const SkPoint& pt 2) const;
303 285
286 void rayCheck(const SkOpRayHit& base, SkOpRayDir dir, SkOpRayHit** hits,
287 SkChunkAlloc* allocator);
288
304 void resetVisited() { 289 void resetVisited() {
305 fVisited = false; 290 fVisited = false;
306 } 291 }
307 292
308 void setContour(SkOpContour* contour) { 293 void setContour(SkOpContour* contour) {
309 fContour = contour; 294 fContour = contour;
310 } 295 }
311 296
312 void setCubicType(SkDCubic::CubicType cubicType) { 297 void setCubicType(SkDCubic::CubicType cubicType) {
313 fCubicType = cubicType; 298 fCubicType = cubicType;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 return result; 331 return result;
347 } 332 }
348 333
349 SkOpAngle* spanToAngle(SkOpSpanBase* start, SkOpSpanBase* end) { 334 SkOpAngle* spanToAngle(SkOpSpanBase* start, SkOpSpanBase* end) {
350 SkASSERT(start != end); 335 SkASSERT(start != end);
351 return start->t() < end->t() ? start->upCast()->toAngle() : start->fromA ngle(); 336 return start->t() < end->t() ? start->upCast()->toAngle() : start->fromA ngle();
352 } 337 }
353 338
354 bool subDivide(const SkOpSpanBase* start, const SkOpSpanBase* end, SkDCurve* result) const; 339 bool subDivide(const SkOpSpanBase* start, const SkOpSpanBase* end, SkDCurve* result) const;
355 bool subDivide(const SkOpSpanBase* start, const SkOpSpanBase* end, SkOpCurve * result) const; 340 bool subDivide(const SkOpSpanBase* start, const SkOpSpanBase* end, SkOpCurve * result) const;
356 void subDivideBounds(const SkOpSpanBase* start, const SkOpSpanBase* end,
357 SkPathOpsBounds* bounds) const;
358 341
359 const SkOpSpanBase* tail() const { 342 const SkOpSpanBase* tail() const {
360 return &fTail; 343 return &fTail;
361 } 344 }
362 345
363 SkOpSpanBase* tail() { 346 SkOpSpanBase* tail() {
364 return &fTail; 347 return &fTail;
365 } 348 }
366 349
367 static double TAtMid(const SkOpSpanBase* start, const SkOpSpanBase* end, dou ble mid) {
368 return start->t() * (1 - mid) + end->t() * mid;
369 }
370
371 SkDPoint top(const SkOpSpanBase* start, const SkOpSpanBase* end, double* top T) const;
372
373 void undoneSpan(SkOpSpanBase** start, SkOpSpanBase** end); 350 void undoneSpan(SkOpSpanBase** start, SkOpSpanBase** end);
374 int updateOppWinding(const SkOpSpanBase* start, const SkOpSpanBase* end) con st; 351 int updateOppWinding(const SkOpSpanBase* start, const SkOpSpanBase* end) con st;
375 int updateOppWinding(const SkOpAngle* angle) const; 352 int updateOppWinding(const SkOpAngle* angle) const;
376 int updateOppWindingReverse(const SkOpAngle* angle) const; 353 int updateOppWindingReverse(const SkOpAngle* angle) const;
377 int updateWinding(const SkOpSpanBase* start, const SkOpSpanBase* end) const; 354 int updateWinding(SkOpSpanBase* start, SkOpSpanBase* end);
378 int updateWinding(const SkOpAngle* angle) const; 355 int updateWinding(SkOpAngle* angle);
379 int updateWindingReverse(const SkOpAngle* angle) const; 356 int updateWindingReverse(const SkOpAngle* angle);
380 357
381 static bool UseInnerWinding(int outerWinding, int innerWinding); 358 static bool UseInnerWinding(int outerWinding, int innerWinding);
382 359
383 SkPath::Verb verb() const { 360 SkPath::Verb verb() const {
384 return fVerb; 361 return fVerb;
385 } 362 }
386 363
387 SkScalar weight() const { 364 SkScalar weight() const {
388 return fWeight; 365 return fWeight;
389 } 366 }
390 367
391 int windingAtT(double tHit, const SkOpSpan* span, bool crossOpp, SkScalar* d x) const; 368 SkOpSpan* windingSpanAtT(double tHit);
392 int windSum(const SkOpAngle* angle) const; 369 int windSum(const SkOpAngle* angle) const;
393 370
394 SkPoint* writablePt(bool end) { 371 SkPoint* writablePt(bool end) {
395 return &fPts[end ? SkPathOpsVerbToPoints(fVerb) : 0]; 372 return &fPts[end ? SkPathOpsVerbToPoints(fVerb) : 0];
396 } 373 }
397 374
398 private: 375 private:
399 SkOpSpan fHead; // the head span always has its t set to zero 376 SkOpSpan fHead; // the head span always has its t set to zero
400 SkOpSpanBase fTail; // the tail span always has its t set to one 377 SkOpSpanBase fTail; // the tail span always has its t set to one
401 SkOpContour* fContour; 378 SkOpContour* fContour;
402 SkOpSegment* fNext; // forward-only linked list used by contour to walk the segments 379 SkOpSegment* fNext; // forward-only linked list used by contour to walk the segments
403 const SkOpSegment* fPrev; 380 const SkOpSegment* fPrev;
404 SkPoint* fPts; // pointer into array of points owned by edge builder that m ay be tweaked 381 SkPoint* fPts; // pointer into array of points owned by edge builder that m ay be tweaked
405 SkPathOpsBounds fBounds; // tight bounds 382 SkPathOpsBounds fBounds; // tight bounds
406 SkScalar fWeight; 383 SkScalar fWeight;
407 int fCount; // number of spans (one for a non-intersecting segment) 384 int fCount; // number of spans (one for a non-intersecting segment)
408 int fDoneCount; // number of processed spans (zero initially) 385 int fDoneCount; // number of processed spans (zero initially)
409 SkPath::Verb fVerb; 386 SkPath::Verb fVerb;
410 SkDCubic::CubicType fCubicType; 387 SkDCubic::CubicType fCubicType;
388 bool fTopsFound;
411 bool fVisited; // used by missing coincidence check 389 bool fVisited; // used by missing coincidence check
412 SkDEBUGCODE(int fID); 390 SkDEBUGCODE(int fID);
413 }; 391 };
414 392
415 #endif 393 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698