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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 void alignSpanState(int start, int end); | 295 void alignSpanState(int start, int end); |
296 bool betweenTs(int lesser, double testT, int greater) const; | 296 bool betweenTs(int lesser, double testT, int greater) const; |
297 void blindCancel(const SkCoincidence& coincidence, SkOpSegment* other); | 297 void blindCancel(const SkCoincidence& coincidence, SkOpSegment* other); |
298 void blindCoincident(const SkCoincidence& coincidence, SkOpSegment* other); | 298 void blindCoincident(const SkCoincidence& coincidence, SkOpSegment* other); |
299 bool calcAngles(); | 299 bool calcAngles(); |
300 double calcMissingTEnd(const SkOpSegment* ref, double loEnd, double min, dou
ble max, | 300 double calcMissingTEnd(const SkOpSegment* ref, double loEnd, double min, dou
ble max, |
301 double hiEnd, const SkOpSegment* other, int thisEnd); | 301 double hiEnd, const SkOpSegment* other, int thisEnd); |
302 double calcMissingTStart(const SkOpSegment* ref, double loEnd, double min, d
ouble max, | 302 double calcMissingTStart(const SkOpSegment* ref, double loEnd, double min, d
ouble max, |
303 double hiEnd, const SkOpSegment* other, int thisEnd
); | 303 double hiEnd, const SkOpSegment* other, int thisEnd
); |
304 void checkDuplicates(); | 304 void checkDuplicates(); |
305 bool checkEnds(); | 305 void checkEnds(); |
306 void checkMultiples(); | 306 void checkMultiples(); |
307 void checkSmall(); | 307 void checkSmall(); |
308 bool checkSmall(int index) const; | 308 bool checkSmall(int index) const; |
309 void checkTiny(); | 309 void checkTiny(); |
310 int computeSum(int startIndex, int endIndex, SkOpAngle::IncludeType includeT
ype); | 310 int computeSum(int startIndex, int endIndex, SkOpAngle::IncludeType includeT
ype); |
311 bool containsPt(const SkPoint& , int index, int endIndex) const; | 311 bool containsPt(const SkPoint& , int index, int endIndex) const; |
312 int crossedSpanY(const SkPoint& basePt, SkScalar* bestY, double* hitT, bool*
hitSomething, | 312 int crossedSpanY(const SkPoint& basePt, SkScalar* bestY, double* hitT, bool*
hitSomething, |
313 double mid, bool opp, bool current) const; | 313 double mid, bool opp, bool current) const; |
314 bool findCoincidentMatch(const SkOpSpan* span, const SkOpSegment* other, int
oStart, int oEnd, | 314 bool findCoincidentMatch(const SkOpSpan* span, const SkOpSegment* other, int
oStart, int oEnd, |
315 int step, SkPoint* startPt, SkPoint* endPt, double*
endT) const; | 315 int step, SkPoint* startPt, SkPoint* endPt, double*
endT) const; |
316 SkOpSegment* findNextOp(SkTDArray<SkOpSpan*>* chase, int* nextStart, int* ne
xtEnd, | 316 SkOpSegment* findNextOp(SkTDArray<SkOpSpan*>* chase, int* nextStart, int* ne
xtEnd, |
317 bool* unsortable, SkPathOp op, int xorMiMask, int xo
rSuMask); | 317 bool* unsortable, SkPathOp op, int xorMiMask, int xo
rSuMask); |
318 SkOpSegment* findNextWinding(SkTDArray<SkOpSpan*>* chase, int* nextStart, in
t* nextEnd, | 318 SkOpSegment* findNextWinding(SkTDArray<SkOpSpan*>* chase, int* nextStart, in
t* nextEnd, |
319 bool* unsortable); | 319 bool* unsortable); |
320 SkOpSegment* findNextXor(int* nextStart, int* nextEnd, bool* unsortable); | 320 SkOpSegment* findNextXor(int* nextStart, int* nextEnd, bool* unsortable); |
321 int findExactT(double t, const SkOpSegment* ) const; | 321 int findExactT(double t, const SkOpSegment* ) const; |
322 int findOtherT(double t, const SkOpSegment* ) const; | 322 int findOtherT(double t, const SkOpSegment* ) const; |
323 int findT(double t, const SkPoint& , const SkOpSegment* ) const; | 323 int findT(double t, const SkPoint& , const SkOpSegment* ) const; |
324 SkOpSegment* findTop(int* tIndex, int* endIndex, bool* unsortable, bool firs
tPass); | 324 SkOpSegment* findTop(int* tIndex, int* endIndex, bool* unsortable, bool firs
tPass); |
325 void fixOtherTIndex(); | 325 void fixOtherTIndex(); |
326 bool inconsistentAngle(int maxWinding, int sumWinding, int oppMaxWinding, in
t oppSumWinding, | |
327 const SkOpAngle* angle) const; | |
328 void initWinding(int start, int end, SkOpAngle::IncludeType angleIncludeType
); | 326 void initWinding(int start, int end, SkOpAngle::IncludeType angleIncludeType
); |
329 bool initWinding(int start, int end, double tHit, int winding, SkScalar hitD
x, int oppWind, | 327 void initWinding(int start, int end, double tHit, int winding, SkScalar hitD
x, int oppWind, |
330 SkScalar hitOppDx); | 328 SkScalar hitOppDx); |
331 bool isMissing(double startT, const SkPoint& pt) const; | 329 bool isMissing(double startT, const SkPoint& pt) const; |
332 bool isTiny(const SkOpAngle* angle) const; | 330 bool isTiny(const SkOpAngle* angle) const; |
333 bool joinCoincidence(SkOpSegment* other, double otherT, const SkPoint& other
Pt, int step, | 331 bool joinCoincidence(SkOpSegment* other, double otherT, const SkPoint& other
Pt, int step, |
334 bool cancel); | 332 bool cancel); |
335 SkOpSpan* markAndChaseDoneBinary(int index, int endIndex); | 333 SkOpSpan* markAndChaseDoneBinary(int index, int endIndex); |
336 SkOpSpan* markAndChaseDoneUnary(int index, int endIndex); | 334 SkOpSpan* markAndChaseDoneUnary(int index, int endIndex); |
337 bool markAndChaseWinding(const SkOpAngle* angle, int winding, int oppWinding
, | 335 SkOpSpan* markAndChaseWinding(const SkOpAngle* angle, int winding, int oppWi
nding); |
338 SkOpSpan** lastPtr); | |
339 SkOpSpan* markAngle(int maxWinding, int sumWinding, int oppMaxWinding, int o
ppSumWinding, | 336 SkOpSpan* markAngle(int maxWinding, int sumWinding, int oppMaxWinding, int o
ppSumWinding, |
340 const SkOpAngle* angle); | 337 const SkOpAngle* angle); |
341 void markDone(int index, int winding); | 338 void markDone(int index, int winding); |
342 void markDoneBinary(int index); | 339 void markDoneBinary(int index); |
343 void markDoneFinal(int index); | |
344 void markDoneUnary(int index); | 340 void markDoneUnary(int index); |
345 bool nextCandidate(int* start, int* end) const; | 341 bool nextCandidate(int* start, int* end) const; |
346 int nextSpan(int from, int step) const; | 342 int nextSpan(int from, int step) const; |
347 void pinT(const SkPoint& pt, double* t); | 343 void pinT(const SkPoint& pt, double* t); |
348 void setUpWindings(int index, int endIndex, int* sumMiWinding, int* sumSuWin
ding, | 344 void setUpWindings(int index, int endIndex, int* sumMiWinding, int* sumSuWin
ding, |
349 int* maxWinding, int* sumWinding, int* oppMaxWinding, int* oppSumWin
ding); | 345 int* maxWinding, int* sumWinding, int* oppMaxWinding, int* oppSumWin
ding); |
350 void sortAngles(); | 346 void sortAngles(); |
351 bool subDivide(int start, int end, SkPoint edge[4]) const; | 347 bool subDivide(int start, int end, SkPoint edge[4]) const; |
352 bool subDivide(int start, int end, SkDCubic* result) const; | 348 bool subDivide(int start, int end, SkDCubic* result) const; |
353 void undoneSpan(int* start, int* end); | 349 void undoneSpan(int* start, int* end); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 const SkOpAngle* activeAngleOther(int index, int* start, int* end, bool* don
e, | 396 const SkOpAngle* activeAngleOther(int index, int* start, int* end, bool* don
e, |
401 bool* sortable) const; | 397 bool* sortable) const; |
402 bool activeOp(int xorMiMask, int xorSuMask, int index, int endIndex, SkPathO
p op, | 398 bool activeOp(int xorMiMask, int xorSuMask, int index, int endIndex, SkPathO
p op, |
403 int* sumMiWinding, int* sumSuWinding); | 399 int* sumMiWinding, int* sumSuWinding); |
404 bool activeWinding(int index, int endIndex, int* sumWinding); | 400 bool activeWinding(int index, int endIndex, int* sumWinding); |
405 void addCancelOutsides(const SkPoint& startPt, const SkPoint& endPt, SkOpSeg
ment* other); | 401 void addCancelOutsides(const SkPoint& startPt, const SkPoint& endPt, SkOpSeg
ment* other); |
406 void addCoinOutsides(const SkPoint& startPt, const SkPoint& endPt, SkOpSegme
nt* other); | 402 void addCoinOutsides(const SkPoint& startPt, const SkPoint& endPt, SkOpSegme
nt* other); |
407 SkOpAngle* addSingletonAngleDown(SkOpSegment** otherPtr, SkOpAngle** ); | 403 SkOpAngle* addSingletonAngleDown(SkOpSegment** otherPtr, SkOpAngle** ); |
408 SkOpAngle* addSingletonAngleUp(SkOpSegment** otherPtr, SkOpAngle** ); | 404 SkOpAngle* addSingletonAngleUp(SkOpSegment** otherPtr, SkOpAngle** ); |
409 SkOpAngle* addSingletonAngles(int step); | 405 SkOpAngle* addSingletonAngles(int step); |
410 void alignRange(int lower, int upper, const SkOpSegment* other, int oLower,
int oUpper); | |
411 void alignSpan(const SkPoint& newPt, double newT, const SkOpSegment* other,
double otherT, | 406 void alignSpan(const SkPoint& newPt, double newT, const SkOpSegment* other,
double otherT, |
412 const SkOpSegment* other2, SkOpSpan* oSpan, SkTDArray<Aligned
Span>* ); | 407 const SkOpSegment* other2, SkOpSpan* oSpan, SkTDArray<Aligned
Span>* ); |
413 bool betweenPoints(double midT, const SkPoint& pt1, const SkPoint& pt2) cons
t; | 408 bool betweenPoints(double midT, const SkPoint& pt1, const SkPoint& pt2) cons
t; |
414 void bumpCoincidentBlind(bool binary, int index, int last); | 409 void bumpCoincidentBlind(bool binary, int index, int last); |
415 bool bumpCoincidentThis(const SkOpSpan& oTest, bool binary, int* index, | 410 bool bumpCoincidentThis(const SkOpSpan& oTest, bool binary, int* index, |
416 SkTArray<SkPoint, true>* outsideTs); | 411 SkTArray<SkPoint, true>* outsideTs); |
417 void bumpCoincidentOBlind(int index, int last); | 412 void bumpCoincidentOBlind(int index, int last); |
418 bool bumpCoincidentOther(const SkOpSpan& oTest, int* index, | 413 void bumpCoincidentOther(const SkOpSpan& oTest, int* index, |
419 SkTArray<SkPoint, true>* outsideTs, const SkPoint&
endPt); | 414 SkTArray<SkPoint, true>* outsideTs); |
420 bool bumpSpan(SkOpSpan* span, int windDelta, int oppDelta); | 415 bool bumpSpan(SkOpSpan* span, int windDelta, int oppDelta); |
421 bool calcLoopSpanCount(const SkOpSpan& thisSpan, int* smallCounts); | 416 bool calcLoopSpanCount(const SkOpSpan& thisSpan, int* smallCounts); |
422 bool checkForSmall(const SkOpSpan* span, const SkPoint& pt, double newT, | 417 bool checkForSmall(const SkOpSpan* span, const SkPoint& pt, double newT, |
423 int* less, int* more) const; | 418 int* less, int* more) const; |
424 void checkLinks(const SkOpSpan* , | 419 void checkLinks(const SkOpSpan* , |
425 SkTArray<MissingSpan, true>* missingSpans) const; | 420 SkTArray<MissingSpan, true>* missingSpans) const; |
426 static void CheckOneLink(const SkOpSpan* test, const SkOpSpan* oSpan, | 421 static void CheckOneLink(const SkOpSpan* test, const SkOpSpan* oSpan, |
427 const SkOpSpan* oFirst, const SkOpSpan* oLast, | 422 const SkOpSpan* oFirst, const SkOpSpan* oLast, |
428 const SkOpSpan** missingPtr, | 423 const SkOpSpan** missingPtr, |
429 SkTArray<MissingSpan, true>* missingSpans); | 424 SkTArray<MissingSpan, true>* missingSpans); |
430 int checkSetAngle(int tIndex) const; | 425 int checkSetAngle(int tIndex) const; |
431 void checkSmallCoincidence(const SkOpSpan& span, SkTArray<MissingSpan, true>
* ); | 426 void checkSmallCoincidence(const SkOpSpan& span, SkTArray<MissingSpan, true>
* ); |
432 bool coincidentSmall(const SkPoint& pt, double t, const SkOpSegment* other)
const; | 427 bool coincidentSmall(const SkPoint& pt, double t, const SkOpSegment* other)
const; |
433 bool clockwise(int tStart, int tEnd, bool* swap) const; | 428 bool clockwise(int tStart, int tEnd, bool* swap) const; |
434 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle, | 429 static void ComputeOneSum(const SkOpAngle* baseAngle, SkOpAngle* nextAngle, |
435 SkOpAngle::IncludeType ); | 430 SkOpAngle::IncludeType ); |
436 static void ComputeOneSumReverse(const SkOpAngle* baseAngle, SkOpAngle* next
Angle, | 431 static void ComputeOneSumReverse(const SkOpAngle* baseAngle, SkOpAngle* next
Angle, |
437 SkOpAngle::IncludeType ); | 432 SkOpAngle::IncludeType ); |
438 bool containsT(double t, const SkOpSegment* other, double otherT) const; | 433 bool containsT(double t, const SkOpSegment* other, double otherT) const; |
439 bool decrementSpan(SkOpSpan* span); | 434 bool decrementSpan(SkOpSpan* span); |
440 int findEndSpan(int endIndex) const; | 435 int findEndSpan(int endIndex) const; |
441 int findStartSpan(int startIndex) const; | 436 int findStartSpan(int startIndex) const; |
442 int firstActive(int tIndex) const; | 437 int firstActive(int tIndex) const; |
443 const SkOpSpan& firstSpan(const SkOpSpan& thisSpan) const; | 438 const SkOpSpan& firstSpan(const SkOpSpan& thisSpan) const; |
444 void init(const SkPoint pts[], SkPath::Verb verb, bool operand, bool evenOdd
); | 439 void init(const SkPoint pts[], SkPath::Verb verb, bool operand, bool evenOdd
); |
445 bool inCoincidentSpan(double t, const SkOpSegment* other) const; | 440 bool inCoincidentSpan(double t, const SkOpSegment* other) const; |
446 bool inconsistentWinding(const SkOpAngle* , int maxWinding, int oppMaxWindin
g) const; | |
447 bool inconsistentWinding(int min, int maxWinding, int oppMaxWinding) const; | |
448 bool inconsistentWinding(const char* funName, int tIndex, int winding, int o
ppWinding) const; | |
449 bool inLoop(const SkOpAngle* baseAngle, int spanCount, int* indexPtr) const; | 441 bool inLoop(const SkOpAngle* baseAngle, int spanCount, int* indexPtr) const; |
450 #if OLD_CHASE | 442 #if OLD_CHASE |
451 bool isSimple(int end) const; | 443 bool isSimple(int end) const; |
452 #else | 444 #else |
453 SkOpSegment* isSimple(int* end, int* step); | 445 SkOpSegment* isSimple(int* end, int* step); |
454 #endif | 446 #endif |
455 bool isTiny(int index) const; | 447 bool isTiny(int index) const; |
456 const SkOpSpan& lastSpan(const SkOpSpan& thisSpan) const; | 448 const SkOpSpan& lastSpan(const SkOpSpan& thisSpan) const; |
457 void matchWindingValue(int tIndex, double t, bool borrowWind); | 449 void matchWindingValue(int tIndex, double t, bool borrowWind); |
458 SkOpSpan* markAndChaseDone(int index, int endIndex, int winding); | 450 SkOpSpan* markAndChaseDone(int index, int endIndex, int winding); |
459 SkOpSpan* markAndChaseDoneBinary(const SkOpAngle* angle, int winding, int op
pWinding); | 451 SkOpSpan* markAndChaseDoneBinary(const SkOpAngle* angle, int winding, int op
pWinding); |
460 bool markAndChaseWinding(const SkOpAngle* angle, int winding, SkOpSpan** las
tPtr); | 452 SkOpSpan* markAndChaseWinding(const SkOpAngle* angle, int winding); |
461 bool markAndChaseWinding(int index, int endIndex, int winding, SkOpSpan** la
stPtr); | 453 SkOpSpan* markAndChaseWinding(int index, int endIndex, int winding); |
462 bool markAndChaseWinding(int index, int endIndex, int winding, int oppWindin
g, | 454 SkOpSpan* markAndChaseWinding(int index, int endIndex, int winding, int oppW
inding); |
463 SkOpSpan** lastPtr); | |
464 SkOpSpan* markAngle(int maxWinding, int sumWinding, const SkOpAngle* angle); | 455 SkOpSpan* markAngle(int maxWinding, int sumWinding, const SkOpAngle* angle); |
465 void markDoneBinary(int index, int winding, int oppWinding); | 456 void markDoneBinary(int index, int winding, int oppWinding); |
466 SkOpSpan* markAndChaseDoneUnary(const SkOpAngle* angle, int winding); | 457 SkOpSpan* markAndChaseDoneUnary(const SkOpAngle* angle, int winding); |
467 void markOneDone(const char* funName, int tIndex, int winding); | 458 void markOneDone(const char* funName, int tIndex, int winding); |
468 void markOneDoneBinary(const char* funName, int tIndex); | 459 void markOneDoneBinary(const char* funName, int tIndex); |
469 void markOneDoneBinary(const char* funName, int tIndex, int winding, int opp
Winding); | 460 void markOneDoneBinary(const char* funName, int tIndex, int winding, int opp
Winding); |
470 void markOneDoneFinal(const char* funName, int tIndex); | |
471 void markOneDoneUnary(const char* funName, int tIndex); | 461 void markOneDoneUnary(const char* funName, int tIndex); |
472 bool markOneWinding(const char* funName, int tIndex, int winding, SkOpSpan**
lastPtr); | 462 SkOpSpan* markOneWinding(const char* funName, int tIndex, int winding); |
473 bool markOneWinding(const char* funName, int tIndex, int winding, int oppWin
ding, | 463 SkOpSpan* markOneWinding(const char* funName, int tIndex, int winding, int o
ppWinding); |
474 SkOpSpan** lastPtr); | 464 void markWinding(int index, int winding); |
475 bool markWinding(int index, int winding); | 465 void markWinding(int index, int winding, int oppWinding); |
476 bool markWinding(int index, int winding, int oppWinding); | |
477 bool monotonicInY(int tStart, int tEnd) const; | 466 bool monotonicInY(int tStart, int tEnd) const; |
478 | 467 |
479 bool multipleEnds() const { return fTs[count() - 2].fT == 1; } | 468 bool multipleEnds() const { return fTs[count() - 2].fT == 1; } |
480 bool multipleStarts() const { return fTs[1].fT == 0; } | 469 bool multipleStarts() const { return fTs[1].fT == 0; } |
481 | 470 |
482 SkOpSegment* nextChase(int* index, int* step, int* min, SkOpSpan** last) con
st; | 471 SkOpSegment* nextChase(int* index, int* step, int* min, SkOpSpan** last); |
483 int nextExactSpan(int from, int step) const; | 472 int nextExactSpan(int from, int step) const; |
484 void resetSpanFlags(); | |
485 bool serpentine(int tStart, int tEnd) const; | 473 bool serpentine(int tStart, int tEnd) const; |
486 void setCoincidentRange(const SkPoint& startPt, const SkPoint& endPt, SkOpS
egment* other); | 474 void setCoincidentRange(const SkPoint& startPt, const SkPoint& endPt, SkOpS
egment* other); |
487 void setFromAngle(int endIndex, SkOpAngle* ); | 475 void setFromAngle(int endIndex, SkOpAngle* ); |
488 void setSpanFlags(const SkPoint& pt, double newT, SkOpSpan* span); | |
489 void setToAngle(int endIndex, SkOpAngle* ); | 476 void setToAngle(int endIndex, SkOpAngle* ); |
490 void setUpWindings(int index, int endIndex, int* sumMiWinding, | 477 void setUpWindings(int index, int endIndex, int* sumMiWinding, |
491 int* maxWinding, int* sumWinding); | 478 int* maxWinding, int* sumWinding); |
492 void subDivideBounds(int start, int end, SkPathOpsBounds* bounds) const; | 479 void subDivideBounds(int start, int end, SkPathOpsBounds* bounds) const; |
493 static void TrackOutsidePair(SkTArray<SkPoint, true>* outsideTs, const SkPoi
nt& endPt, | 480 static void TrackOutsidePair(SkTArray<SkPoint, true>* outsideTs, const SkPoi
nt& endPt, |
494 const SkPoint& startPt); | 481 const SkPoint& startPt); |
495 static void TrackOutside(SkTArray<SkPoint, true>* outsideTs, const SkPoint&
startPt); | 482 static void TrackOutside(SkTArray<SkPoint, true>* outsideTs, const SkPoint&
startPt); |
496 int updateOppWinding(int index, int endIndex) const; | 483 int updateOppWinding(int index, int endIndex) const; |
497 int updateOppWinding(const SkOpAngle* angle) const; | 484 int updateOppWinding(const SkOpAngle* angle) const; |
498 int updateWinding(int index, int endIndex) const; | 485 int updateWinding(int index, int endIndex) const; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 return value < 0 ? '?' : value <= 9 ? '0' + value : '+'; | 520 return value < 0 ? '?' : value <= 9 ? '0' + value : '+'; |
534 } | 521 } |
535 #endif | 522 #endif |
536 // available to testing only | 523 // available to testing only |
537 void debugConstruct(); | 524 void debugConstruct(); |
538 void debugConstructCubic(SkPoint shortQuad[4]); | 525 void debugConstructCubic(SkPoint shortQuad[4]); |
539 void debugConstructLine(SkPoint shortQuad[2]); | 526 void debugConstructLine(SkPoint shortQuad[2]); |
540 void debugConstructQuad(SkPoint shortQuad[3]); | 527 void debugConstructQuad(SkPoint shortQuad[3]); |
541 void debugReset(); | 528 void debugReset(); |
542 void dumpDPts() const; | 529 void dumpDPts() const; |
543 void dumpHexPts() const; | |
544 void dumpSpan(int index) const; | 530 void dumpSpan(int index) const; |
545 | 531 |
546 const SkPoint* fPts; | 532 const SkPoint* fPts; |
547 SkPathOpsBounds fBounds; | 533 SkPathOpsBounds fBounds; |
548 // FIXME: can't convert to SkTArray because it uses insert | 534 // FIXME: can't convert to SkTArray because it uses insert |
549 SkTDArray<SkOpSpan> fTs; // 2+ (always includes t=0 t=1) -- at least (numbe
r of spans) + 1 | 535 SkTDArray<SkOpSpan> fTs; // 2+ (always includes t=0 t=1) -- at least (numbe
r of spans) + 1 |
550 SkOpAngleSet fAngles; // empty or 2+ -- (number of non-zero spans) * 2 | 536 SkOpAngleSet fAngles; // empty or 2+ -- (number of non-zero spans) * 2 |
551 // OPTIMIZATION: could pack donespans, verb, operand, xor into 1 int-sized v
alue | 537 // OPTIMIZATION: could pack donespans, verb, operand, xor into 1 int-sized v
alue |
552 int fDoneSpans; // quick check that segment is finished | 538 int fDoneSpans; // quick check that segment is finished |
553 // OPTIMIZATION: force the following to be byte-sized | 539 // OPTIMIZATION: force the following to be byte-sized |
554 SkPath::Verb fVerb; | 540 SkPath::Verb fVerb; |
555 bool fLoop; // set if cubic intersects itself | 541 bool fLoop; // set if cubic intersects itself |
556 bool fMultiples; // set if curve intersects multiple other curves at one in
terior point | 542 bool fMultiples; // set if curve intersects multiple other curves at one in
terior point |
557 bool fOperand; | 543 bool fOperand; |
558 bool fXor; // set if original contour had even-odd fill | 544 bool fXor; // set if original contour had even-odd fill |
559 bool fOppXor; // set if opposite operand had even-odd fill | 545 bool fOppXor; // set if opposite operand had even-odd fill |
560 bool fSmall; // set if some span is small | 546 bool fSmall; // set if some span is small |
561 bool fTiny; // set if some span is tiny | 547 bool fTiny; // set if some span is tiny |
562 #if defined(SK_DEBUG) || !FORCE_RELEASE | 548 #if defined(SK_DEBUG) || !FORCE_RELEASE |
563 int fID; | 549 int fID; |
564 #endif | 550 #endif |
565 | 551 |
566 friend class PathOpsSegmentTester; | 552 friend class PathOpsSegmentTester; |
567 }; | 553 }; |
568 | 554 |
569 #endif | 555 #endif |
OLD | NEW |