485 {
486 auto closeline = [&]() {
487 fScratch[0] = fPts[-1];
488 fScratch[1] = *fMoveToPtr;
489 fNeedsCloseLine = false;
490 fNextIsNewContour = true;
492 };
493
494 for (;;) {
496 if (fVerbs == fVerbsStop) {
497 return fNeedsCloseLine
498 ? closeline()
499 : Result{ nullptr,
Edge(kIllegalEdgeValue),
false };
500 }
501
502 SkDEBUGCODE(fIsConic = false;)
503
504 const auto v = *fVerbs++;
505 switch (v) {
507 if (fNeedsCloseLine) {
508 auto res = closeline();
509 fMoveToPtr = fPts++;
510 return res;
511 }
512 fMoveToPtr = fPts++;
513 fNextIsNewContour = true;
514 } break;
516 if (fNeedsCloseLine) return closeline();
517 break;
518 default: {
519
520 const int pts_count = (v+2) / 2,
521 cws_count = (v & (v-1)) / 2;
523
524 fNeedsCloseLine = true;
525 fPts += pts_count;
526 fConicWeights += cws_count;
527
529 SkASSERT(fIsConic == (cws_count > 0));
530
531 bool isNewContour = fNextIsNewContour;
532 fNextIsNewContour = false;
533 return { &fPts[-(pts_count + 1)],
Edge(v), isNewContour };
534 }
535 }
536 }
537 }
static int PtsInIter(unsigned verb)