Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkOpSpan Class Reference

#include <SkOpSpan.h>

Inheritance diagram for SkOpSpan:
SkOpSpanBase

Public Member Functions

bool alreadyAdded () const
 
bool clearCoincident ()
 
int computeWindSum ()
 
bool containsCoincidence (const SkOpSegment *) const
 
bool containsCoincidence (const SkOpSpan *coin) const
 
bool debugCoinLoopCheck () const
 
void dumpCoin () const
 
bool dumpSpan () const
 
bool done () const
 
void init (SkOpSegment *parent, SkOpSpan *prev, double t, const SkPoint &pt)
 
bool insertCoincidence (const SkOpSegment *, bool flipped, bool ordered)
 
void insertCoincidence (SkOpSpan *coin)
 
bool isCanceled () const
 
bool isCoincident () const
 
void markAdded ()
 
SkOpSpanBasenext () const
 
int oppSum () const
 
int oppValue () const
 
void release (const SkOpPtT *)
 
SkOpPtTsetCoinStart (SkOpSpan *oldCoinStart, SkOpSegment *oppSegment)
 
void setDone (bool done)
 
void setNext (SkOpSpanBase *nextT)
 
void setOppSum (int oppSum)
 
void setOppValue (int oppValue)
 
void setToAngle (SkOpAngle *angle)
 
void setWindSum (int windSum)
 
void setWindValue (int windValue)
 
bool sortableTop (SkOpContour *)
 
SkOpAngletoAngle () const
 
int windSum () const
 
int windValue () const
 
- Public Member Functions inherited from SkOpSpanBase
bool addOpp (SkOpSpanBase *opp)
 
void bumpSpanAdds ()
 
bool chased () const
 
void checkForCollapsedCoincidence ()
 
const SkOpSpanBasecoinEnd () const
 
Collapsed collapsed (double s, double e) const
 
bool contains (const SkOpSpanBase *) const
 
const SkOpPtTcontains (const SkOpSegment *) const
 
bool containsCoinEnd (const SkOpSpanBase *coin) const
 
bool containsCoinEnd (const SkOpSegment *) const
 
SkOpContourcontour () const
 
int debugBumpCount ()
 
int debugID () const
 
bool debugAlignedEnd (double t, const SkPoint &pt) const
 
bool debugAlignedInner () const
 
const SkOpAngledebugAngle (int id) const
 
const SkOpCoincidencedebugCoincidence () const
 
bool debugCoinEndLoopCheck () const
 
SkOpContourdebugContour (int id) const
 
const SkOpPtTdebugPtT (int id) const
 
void debugResetCoinT () const
 
const SkOpSegmentdebugSegment (int id) const
 
void debugSetCoinT (int) const
 
const SkOpSpanBasedebugSpan (int id) const
 
const SkOpSpandebugStarter (SkOpSpanBase const **endPtr) const
 
SkOpGlobalStateglobalState () const
 
void debugValidate () const
 
bool deleted () const
 
void dump () const
 
void dumpCoin () const
 
void dumpAll () const
 
void dumpBase () const
 
void dumpHead () const
 
bool final () const
 
SkOpAnglefromAngle () const
 
void initBase (SkOpSegment *parent, SkOpSpan *prev, double t, const SkPoint &pt)
 
void insertCoinEnd (SkOpSpanBase *coin)
 
void merge (SkOpSpan *span)
 
bool mergeMatches (SkOpSpanBase *opp)
 
const SkOpSpanprev () const
 
SkOpSpanprev ()
 
const SkPointpt () const
 
const SkOpPtTptT () const
 
SkOpPtTptT ()
 
SkOpSegmentsegment () const
 
void setAligned ()
 
void setChased (bool chased)
 
void setFromAngle (SkOpAngle *angle)
 
void setPrev (SkOpSpan *prev)
 
bool simple () const
 
int spanAddsCount () const
 
const SkOpSpanstarter (const SkOpSpanBase *end) const
 
SkOpSpanstarter (SkOpSpanBase *end)
 
SkOpSpanstarter (SkOpSpanBase **endPtr)
 
int step (const SkOpSpanBase *end) const
 
double t () const
 
void unaligned ()
 
SkOpSpanupCast ()
 
const SkOpSpanupCast () const
 
SkOpSpanupCastable ()
 
const SkOpSpanupCastable () const
 

Additional Inherited Members

- Public Types inherited from SkOpSpanBase
enum class  Collapsed { kNo , kYes , kError }
 
- Protected Member Functions inherited from SkOpSpanBase
 SkDEBUGCODE (int fCount;) SkDEBUGCODE(int fID
 
- Protected Attributes inherited from SkOpSpanBase
SkOpPtT fPtT
 
SkOpSegmentfSegment
 
SkOpSpanBasefCoinEnd
 
SkOpAnglefFromAngle
 
SkOpSpanfPrev
 
int fSpanAdds
 
bool fAligned
 
bool fChased
 

Detailed Description

Definition at line 418 of file SkOpSpan.h.

Member Function Documentation

◆ alreadyAdded()

bool SkOpSpan::alreadyAdded ( ) const
inline

Definition at line 420 of file SkOpSpan.h.

420 {
421 if (fAlreadyAdded) {
422 return true;
423 }
424 return false;
425 }

◆ clearCoincident()

bool SkOpSpan::clearCoincident ( )
inline

Definition at line 427 of file SkOpSpan.h.

427 {
428 SkASSERT(!final());
429 if (fCoincident == this) {
430 return false;
431 }
432 fCoincident = this;
433 return true;
434 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ computeWindSum()

int SkOpSpan::computeWindSum ( )

Definition at line 378 of file SkOpSpan.cpp.

378 {
379 SkOpGlobalState* globals = this->globalState();
380 SkOpContour* contourHead = globals->contourHead();
381 int windTry = 0;
382 while (!this->sortableTop(contourHead) && ++windTry < SkOpGlobalState::kMaxWindingTries) {
383 }
384 return this->windSum();
385}
SkOpContourHead * contourHead()
SkOpGlobalState * globalState() const
Definition: SkOpSpan.cpp:239
bool sortableTop(SkOpContour *)
int windSum() const
Definition: SkOpSpan.h:555

◆ containsCoincidence() [1/2]

bool SkOpSpan::containsCoincidence ( const SkOpSegment segment) const

Definition at line 387 of file SkOpSpan.cpp.

387 {
388 SkASSERT(this->segment() != segment);
389 const SkOpSpan* next = fCoincident;
390 do {
391 if (next->segment() == segment) {
392 return true;
393 }
394 } while ((next = next->fCoincident) != this);
395 return false;
396}
SkOpSegment * segment() const
Definition: SkOpSpan.h:318
SkOpSpanBase * next() const
Definition: SkOpSpan.h:495

◆ containsCoincidence() [2/2]

bool SkOpSpan::containsCoincidence ( const SkOpSpan coin) const
inline

Definition at line 439 of file SkOpSpan.h.

439 {
440 SkASSERT(this != coin);
441 const SkOpSpan* next = this;
442 while ((next = next->fCoincident) != this) {
443 if (next == coin) {
444 return true;
445 }
446 }
447 return false;
448 }

◆ debugCoinLoopCheck()

bool SkOpSpan::debugCoinLoopCheck ( ) const

Definition at line 2584 of file SkPathOpsDebug.cpp.

2584 {
2585 int loop = 0;
2586 const SkOpSpan* next = this;
2587 SkOpSpan* nextCoin;
2588 do {
2589 nextCoin = next->fCoincident;
2590 SkASSERT(nextCoin == this || nextCoin->fCoincident != nextCoin);
2591 for (int check = 1; check < loop - 1; ++check) {
2592 const SkOpSpan* checkCoin = this->fCoincident;
2593 const SkOpSpan* innerCoin = checkCoin;
2594 for (int inner = check + 1; inner < loop; ++inner) {
2595 innerCoin = innerCoin->fCoincident;
2596 if (checkCoin == innerCoin) {
2597 SkDebugf("*** bad coincident loop ***\n");
2598 return false;
2599 }
2600 }
2601 }
2602 ++loop;
2603 } while ((next = nextCoin) && next != this);
2604 return true;
2605}
#define check(reporter, ref, unref, make, kill)
Definition: RefCntTest.cpp:85
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1

◆ done()

bool SkOpSpan::done ( ) const
inline

Definition at line 459 of file SkOpSpan.h.

459 {
460 SkASSERT(!final());
461 return fDone;
462 }

◆ dumpCoin()

void SkOpSpan::dumpCoin ( ) const

Definition at line 795 of file PathOpsDebug.cpp.

795 {
796 const SkOpSpan* coincident = fCoincident;
797 bool ok = debugCoinLoopCheck();
798 this->dump();
799 int loop = 0;
800 do {
801 coincident->dump();
802 if (!ok && ++loop > 10) {
803 SkDebugf("*** abort loop ***\n");
804 break;
805 }
806 } while ((coincident = coincident->fCoincident) != this);
807}
static bool coincident(const SkPoint &a, const SkPoint &b)
static bool ok(int result)
void dump() const
bool debugCoinLoopCheck() const

◆ dumpSpan()

bool SkOpSpan::dumpSpan ( ) const

Definition at line 809 of file PathOpsDebug.cpp.

809 {
810 SkOpSpan* coin = fCoincident;
811 if (this != coin) {
812 SkDebugf(" coinStart seg/span=%d/%d", coin->segment()->debugID(), coin->debugID());
813 }
814 SkDebugf(" windVal=%d", this->windValue());
815 SkDebugf(" windSum=");
817 if (this->oppValue() != 0 || this->oppSum() != SK_MinS32) {
818 SkDebugf(" oppVal=%d", this->oppValue());
819 SkDebugf(" oppSum=");
821 }
822 if (this->done()) {
823 SkDebugf(" done");
824 }
825 return this != coin;
826}
static constexpr int32_t SK_MinS32
Definition: SkMath.h:22
int debugID() const
Definition: SkOpSegment.h:154
int debugID() const
Definition: SkOpSpan.h:224
int oppValue() const
Definition: SkOpSpan.h:505
int oppSum() const
Definition: SkOpSpan.h:500
bool done() const
Definition: SkOpSpan.h:459
int windValue() const
Definition: SkOpSpan.h:560
static void WindingPrintf(int winding)

◆ init()

void SkOpSpan::init ( SkOpSegment parent,
SkOpSpan prev,
double  t,
const SkPoint pt 
)

Definition at line 398 of file SkOpSpan.cpp.

398 {
399 SkASSERT(t != 1);
401 fCoincident = this;
402 fToAngle = nullptr;
403 fWindSum = fOppSum = SK_MinS32;
404 fWindValue = 1;
405 fOppValue = 0;
406 fTopTTry = 0;
407 fChased = fDone = false;
409 fAlreadyAdded = false;
410}
void bumpCount()
Definition: SkOpSegment.h:113
const SkPoint & pt() const
Definition: SkOpSpan.h:306
const SkOpSpan * prev() const
Definition: SkOpSpan.h:298
void initBase(SkOpSegment *parent, SkOpSpan *prev, double t, const SkPoint &pt)
Definition: SkOpSpan.cpp:243
bool fChased
Definition: SkOpSpan.h:412
double t() const
Definition: SkOpSpan.h:375

◆ insertCoincidence() [1/2]

bool SkOpSpan::insertCoincidence ( const SkOpSegment segment,
bool  flipped,
bool  ordered 
)

Definition at line 413 of file SkOpSpan.cpp.

413 {
414 if (this->containsCoincidence(segment)) {
415 return true;
416 }
417 SkOpPtT* next = &fPtT;
418 while ((next = next->next()) != &fPtT) {
419 if (next->segment() == segment) {
420 SkOpSpan* span;
421 SkOpSpanBase* base = next->span();
422 if (!ordered) {
423 const SkOpPtT* spanEndPtT = fNext->contains(segment);
424 FAIL_IF(!spanEndPtT);
425 const SkOpSpanBase* spanEnd = spanEndPtT->span();
426 const SkOpPtT* start = base->ptT()->starter(spanEnd->ptT());
427 FAIL_IF(!start->span()->upCastable());
428 span = const_cast<SkOpSpan*>(start->span()->upCast());
429 } else if (flipped) {
430 span = base->prev();
431 FAIL_IF(!span);
432 } else {
433 FAIL_IF(!base->upCastable());
434 span = base->upCast();
435 }
436 this->insertCoincidence(span);
437 return true;
438 }
439 }
440#if DEBUG_COINCIDENCE
441 SkASSERT(0); // FIXME? if we get here, the span is missing its opposite segment...
442#endif
443 return true;
444}
#define FAIL_IF(cond)
const SkOpSpanBase * span() const
Definition: SkOpSpan.h:154
SkOpPtT fPtT
Definition: SkOpSpan.h:405
bool contains(const SkOpSpanBase *) const
Definition: SkOpSpan.cpp:197
const SkOpPtT * ptT() const
Definition: SkOpSpan.h:310
bool insertCoincidence(const SkOpSegment *, bool flipped, bool ordered)
Definition: SkOpSpan.cpp:413
bool containsCoincidence(const SkOpSegment *) const
Definition: SkOpSpan.cpp:387

◆ insertCoincidence() [2/2]

void SkOpSpan::insertCoincidence ( SkOpSpan coin)
inline

Definition at line 468 of file SkOpSpan.h.

468 {
469 if (containsCoincidence(coin)) {
470 SkASSERT(coin->containsCoincidence(this));
471 return;
472 }
474 SkASSERT(this != coin);
475 SkOpSpan* coinNext = coin->fCoincident;
476 coin->fCoincident = this->fCoincident;
477 this->fCoincident = coinNext;
479 }
void debugValidate() const

◆ isCanceled()

bool SkOpSpan::isCanceled ( ) const
inline

Definition at line 481 of file SkOpSpan.h.

481 {
482 SkASSERT(!final());
483 return fWindValue == 0 && fOppValue == 0;
484 }

◆ isCoincident()

bool SkOpSpan::isCoincident ( ) const
inline

Definition at line 486 of file SkOpSpan.h.

486 {
487 SkASSERT(!final());
488 return fCoincident != this;
489 }

◆ markAdded()

void SkOpSpan::markAdded ( )
inline

Definition at line 491 of file SkOpSpan.h.

491 {
492 fAlreadyAdded = true;
493 }

◆ next()

SkOpSpanBase * SkOpSpan::next ( ) const
inline

Definition at line 495 of file SkOpSpan.h.

495 {
496 SkASSERT(!final());
497 return fNext;
498 }

◆ oppSum()

int SkOpSpan::oppSum ( ) const
inline

Definition at line 500 of file SkOpSpan.h.

500 {
501 SkASSERT(!final());
502 return fOppSum;
503 }

◆ oppValue()

int SkOpSpan::oppValue ( ) const
inline

Definition at line 505 of file SkOpSpan.h.

505 {
506 SkASSERT(!final());
507 return fOppValue;
508 }

◆ release()

void SkOpSpan::release ( const SkOpPtT kept)

Definition at line 446 of file SkOpSpan.cpp.

446 {
447 SkDEBUGCODE(fDebugDeleted = true);
448 SkOPASSERT(kept->span() != this);
449 SkASSERT(!final());
450 SkOpSpan* prev = this->prev();
451 SkASSERT(prev);
452 SkOpSpanBase* next = this->next();
453 SkASSERT(next);
454 prev->setNext(next);
455 next->setPrev(prev);
456 this->segment()->release(this);
457 SkOpCoincidence* coincidence = this->globalState()->coincidence();
458 if (coincidence) {
459 coincidence->fixUp(this->ptT(), kept);
460 }
461 this->ptT()->setDeleted();
462 SkOpPtT* stopPtT = this->ptT();
463 SkOpPtT* testPtT = stopPtT;
464 const SkOpSpanBase* keptSpan = kept->span();
465 do {
466 if (this == testPtT->span()) {
467 testPtT->setSpan(keptSpan);
468 }
469 } while ((testPtT = testPtT->next()) != stopPtT);
470}
#define SkOPASSERT(cond)
void fixUp(SkOpPtT *deleted, const SkOpPtT *kept)
SkOpCoincidence * coincidence()
const SkOpPtT * next() const
Definition: SkOpSpan.h:93
void setSpan(const SkOpSpanBase *span)
Definition: SkOpSpan.h:150
void setDeleted()
Definition: SkOpSpan.cpp:152
void release(const SkOpSpan *)
SkDEBUGCODE(int fCount;) SkDEBUGCODE(int fID
void setPrev(SkOpSpan *prev)
Definition: SkOpSpan.h:334
void setNext(SkOpSpanBase *nextT)
Definition: SkOpSpan.h:519

◆ setCoinStart()

SkOpPtT * SkOpSpan::setCoinStart ( SkOpSpan oldCoinStart,
SkOpSegment oppSegment 
)

◆ setDone()

void SkOpSpan::setDone ( bool  done)
inline

Definition at line 514 of file SkOpSpan.h.

514 {
515 SkASSERT(!final());
516 fDone = done;
517 }

◆ setNext()

void SkOpSpan::setNext ( SkOpSpanBase nextT)
inline

Definition at line 519 of file SkOpSpan.h.

519 {
520 SkASSERT(!final());
521 fNext = nextT;
522 }

◆ setOppSum()

void SkOpSpan::setOppSum ( int  oppSum)

Definition at line 472 of file SkOpSpan.cpp.

472 {
473 SkASSERT(!final());
474 if (fOppSum != SK_MinS32 && fOppSum != oppSum) {
475 this->globalState()->setWindingFailed();
476 return;
477 }
479 fOppSum = oppSum;
480}
#define DEBUG_LIMIT_WIND_SUM
static T SkTAbs(T value)
Definition: SkTemplates.h:43

◆ setOppValue()

void SkOpSpan::setOppValue ( int  oppValue)
inline

Definition at line 526 of file SkOpSpan.h.

526 {
527 SkASSERT(!final());
528 SkASSERT(fOppSum == SK_MinS32);
529 SkOPASSERT(!oppValue || !fDone);
530 fOppValue = oppValue;
531 }

◆ setToAngle()

void SkOpSpan::setToAngle ( SkOpAngle angle)
inline

Definition at line 533 of file SkOpSpan.h.

533 {
534 SkASSERT(!final());
535 fToAngle = angle;
536 }

◆ setWindSum()

void SkOpSpan::setWindSum ( int  windSum)

Definition at line 482 of file SkOpSpan.cpp.

482 {
483 SkASSERT(!final());
484 if (fWindSum != SK_MinS32 && fWindSum != windSum) {
485 this->globalState()->setWindingFailed();
486 return;
487 }
489 fWindSum = windSum;
490}

◆ setWindValue()

void SkOpSpan::setWindValue ( int  windValue)
inline

Definition at line 540 of file SkOpSpan.h.

540 {
541 SkASSERT(!final());
542 SkASSERT(windValue >= 0);
543 SkASSERT(fWindSum == SK_MinS32);
544 SkOPASSERT(!windValue || !fDone);
545 fWindValue = windValue;
546 }

◆ sortableTop()

bool SkOpSpan::sortableTop ( SkOpContour contourHead)

Definition at line 255 of file SkPathOpsWinding.cpp.

255 {
256 SkSTArenaAlloc<1024> allocator;
257 int dirOffset;
258 double t = get_t_guess(fTopTTry++, &dirOffset);
259 SkOpRayHit hitBase;
260 SkOpRayDir dir = hitBase.makeTestBase(this, t);
261 if (hitBase.fSlope.fX == 0 && hitBase.fSlope.fY == 0) {
262 return false;
263 }
264 SkOpRayHit* hitHead = &hitBase;
265 dir = static_cast<SkOpRayDir>(static_cast<int>(dir) + dirOffset);
266 if (hitBase.fSpan && hitBase.fSpan->segment()->verb() > SkPath::kLine_Verb
267 && !pt_dydx(hitBase.fSlope, dir)) {
268 return false;
269 }
270 SkOpContour* contour = contourHead;
271 do {
272 if (!contour->count()) {
273 continue;
274 }
275 contour->rayCheck(hitBase, dir, &hitHead, &allocator);
276 } while ((contour = contour->next()));
277 // sort hits
279 SkOpRayHit* hit = hitHead;
280 while (hit) {
281 sorted.push_back(hit);
282 hit = hit->fNext;
283 }
284 int count = sorted.size();
285 SkTQSort(sorted.begin(), sorted.end(),
288 // verify windings
289#if DEBUG_WINDING
290 SkDebugf("%s dir=%s seg=%d t=%1.9g pt=(%1.9g,%1.9g)\n", __FUNCTION__,
291 gDebugRayDirName[static_cast<int>(dir)], hitBase.fSpan->segment()->debugID(),
292 hitBase.fT, hitBase.fPt.fX, hitBase.fPt.fY);
293 for (int index = 0; index < count; ++index) {
294 hit = sorted[index];
295 SkOpSpan* span = hit->fSpan;
296 SkOpSegment* hitSegment = span ? span->segment() : nullptr;
297 bool operand = span ? hitSegment->operand() : false;
298 bool ccw = ccw_dxdy(hit->fSlope, dir);
299 SkDebugf("%s [%d] valid=%d operand=%d span=%d ccw=%d ", __FUNCTION__, index,
300 hit->fValid, operand, span ? span->debugID() : -1, ccw);
301 if (span) {
302 hitSegment->dumpPtsInner();
303 }
304 SkDebugf(" t=%1.9g pt=(%1.9g,%1.9g) slope=(%1.9g,%1.9g)\n", hit->fT,
305 hit->fPt.fX, hit->fPt.fY, hit->fSlope.fX, hit->fSlope.fY);
306 }
307#endif
308 const SkPoint* last = nullptr;
309 int wind = 0;
310 int oppWind = 0;
311 for (int index = 0; index < count; ++index) {
312 hit = sorted[index];
313 if (!hit->fValid) {
314 return false;
315 }
316 bool ccw = ccw_dxdy(hit->fSlope, dir);
317// SkASSERT(!approximately_zero(hit->fT) || !hit->fValid);
318 SkOpSpan* span = hit->fSpan;
319 if (!span) {
320 return false;
321 }
322 SkOpSegment* hitSegment = span->segment();
323 if (span->windValue() == 0 && span->oppValue() == 0) {
324 continue;
325 }
326 if (last && SkDPoint::ApproximatelyEqual(*last, hit->fPt)) {
327 return false;
328 }
329 if (index < count - 1) {
330 const SkPoint& next = sorted[index + 1]->fPt;
332 return false;
333 }
334 }
335 bool operand = hitSegment->operand();
336 if (operand) {
337 using std::swap;
338 swap(wind, oppWind);
339 }
340 int lastWind = wind;
341 int lastOpp = oppWind;
342 int windValue = ccw ? -span->windValue() : span->windValue();
343 int oppValue = ccw ? -span->oppValue() : span->oppValue();
344 wind += windValue;
345 oppWind += oppValue;
346 bool sumSet = false;
347 int spanSum = span->windSum();
348 int windSum = SkOpSegment::UseInnerWinding(lastWind, wind) ? wind : lastWind;
349 if (spanSum == SK_MinS32) {
350 span->setWindSum(windSum);
351 sumSet = true;
352 } else {
353 // the need for this condition suggests that UseInnerWinding is flawed
354 // happened when last = 1 wind = -1
355#if 0
356 SkASSERT((hitSegment->isXor() ? (windSum & 1) == (spanSum & 1) : windSum == spanSum)
357 || (abs(wind) == abs(lastWind)
358 && (windSum ^ wind ^ lastWind) == spanSum));
359#endif
360 }
361 int oSpanSum = span->oppSum();
362 int oppSum = SkOpSegment::UseInnerWinding(lastOpp, oppWind) ? oppWind : lastOpp;
363 if (oSpanSum == SK_MinS32) {
364 span->setOppSum(oppSum);
365 } else {
366#if 0
367 SkASSERT(hitSegment->oppXor() ? (oppSum & 1) == (oSpanSum & 1) : oppSum == oSpanSum
368 || (abs(oppWind) == abs(lastOpp)
369 && (oppSum ^ oppWind ^ lastOpp) == oSpanSum));
370#endif
371 }
372 if (sumSet) {
373 if (this->globalState()->phase() == SkOpPhase::kFixWinding) {
374 hitSegment->contour()->setCcw(ccw);
375 } else {
376 (void) hitSegment->markAndChaseWinding(span, span->next(), windSum, oppSum, nullptr);
377 (void) hitSegment->markAndChaseWinding(span->next(), span, windSum, oppSum, nullptr);
378 }
379 }
380 if (operand) {
381 using std::swap;
382 swap(wind, oppWind);
383 }
384 last = &hit->fPt;
385 this->globalState()->bumpNested();
386 }
387 return true;
388}
int count
Definition: FontMgrTest.cpp:50
static double get_t_guess(int tTry, int *dirOffset)
static bool hit_compare_x(const SkOpRayHit *a, const SkOpRayHit *b)
static bool ccw_dxdy(const SkDVector &v, SkOpRayDir dir)
static int xy_index(SkOpRayDir dir)
static bool hit_compare_y(const SkOpRayHit *a, const SkOpRayHit *b)
static bool reverse_hit_compare_y(const SkOpRayHit *a, const SkOpRayHit *b)
static bool less_than(SkOpRayDir dir)
SkOpRayDir
static double pt_dydx(const SkDVector &v, SkOpRayDir dir)
static bool reverse_hit_compare_x(const SkOpRayHit *a, const SkOpRayHit *b)
void swap(sk_sp< T > &a, sk_sp< T > &b)
Definition: SkRefCnt.h:341
void SkTQSort(T *begin, T *end, const C &lessThan)
Definition: SkTSort.h:194
void setCcw(int ccw)
Definition: SkOpContour.h:322
void dumpPtsInner(const char *prefix="seg") const
SkPath::Verb verb() const
Definition: SkOpSegment.h:419
bool operand() const
bool markAndChaseWinding(SkOpSpanBase *start, SkOpSpanBase *end, int winding, SkOpSpanBase **lastPtr)
static bool UseInnerWinding(int outerWinding, int innerWinding)
bool oppXor() const
bool isXor() const
SkOpContour * contour() const
Definition: SkOpSegment.h:130
void setWindSum(int windSum)
Definition: SkOpSpan.cpp:482
void setOppSum(int oppSum)
Definition: SkOpSpan.cpp:472
@ kLine_Verb
Definition: SkPath.h:1467
int size() const
Definition: SkTArray.h:421
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
Definition: switches.h:145
SIN Vec< N, float > abs(const Vec< N, float > &x)
Definition: SkVx.h:707
static bool ApproximatelyEqual(const SkPoint &a, const SkPoint &b)
SkOpRayHit * fNext
SkOpSpan * fSpan
SkDVector fSlope
SkOpRayDir makeTestBase(SkOpSpan *span, double t)
float fX
x-axis value
Definition: SkPoint_impl.h:164
float fY
y-axis value
Definition: SkPoint_impl.h:165

◆ toAngle()

SkOpAngle * SkOpSpan::toAngle ( ) const
inline

Definition at line 550 of file SkOpSpan.h.

550 {
551 SkASSERT(!final());
552 return fToAngle;
553 }

◆ windSum()

int SkOpSpan::windSum ( ) const
inline

Definition at line 555 of file SkOpSpan.h.

555 {
556 SkASSERT(!final());
557 return fWindSum;
558 }

◆ windValue()

int SkOpSpan::windValue ( ) const
inline

Definition at line 560 of file SkOpSpan.h.

560 {
561 SkOPASSERT(!final());
562 return fWindValue;
563 }

The documentation for this class was generated from the following files: