• Home
  • Raw
  • Download

Lines Matching refs:SkRegion

32 static SkRegion::RunType* skip_scanline(const SkRegion::RunType runs[])
34 while (runs[0] != SkRegion::kRunTypeSentinel)
39 return (SkRegion::RunType*)(runs + 1); // return past the X-sentinel
43 bool SkRegion::ComputeRunBounds(const SkRegion::RunType runs[], int count, SkIRect* bounds) in ComputeRunBounds()
69 if (*runs < SkRegion::kRunTypeSentinel) in ComputeRunBounds()
79 } while (runs[0] < SkRegion::kRunTypeSentinel); in ComputeRunBounds()
88 SkRegion::SkRegion() { in SkRegion() function in SkRegion
93 SkRegion::SkRegion(const SkRegion& src) { in SkRegion() function in SkRegion
98 SkRegion::SkRegion(const SkIRect& rect) { in SkRegion() function in SkRegion
103 SkRegion::~SkRegion() { in ~SkRegion()
107 void SkRegion::freeRuns() { in freeRuns()
119 void SkRegion::allocateRuns(int count) { in allocateRuns()
123 SkRegion& SkRegion::operator=(const SkRegion& src) { in operator =()
128 void SkRegion::swap(SkRegion& other) { in swap()
133 bool SkRegion::setEmpty() { in setEmpty()
140 bool SkRegion::setRect(int32_t left, int32_t top, in setRect()
151 bool SkRegion::setRect(const SkIRect& r) { in setRect()
155 bool SkRegion::setRegion(const SkRegion& src) { in setRegion()
168 bool SkRegion::op(const SkIRect& rect, const SkRegion& rgn, Op op) { in op()
169 SkRegion tmp(rect); in op()
174 bool SkRegion::op(const SkRegion& rgn, const SkIRect& rect, Op op) { in op()
175 SkRegion tmp(rect); in op()
183 char* SkRegion::toString() in toString()
211 int SkRegion::count_runtype_values(int* itop, int* ibot) const in count_runtype_values()
238 } while (runs[0] < SkRegion::kRunTypeSentinel); in count_runtype_values()
245 bool SkRegion::setRuns(RunType runs[], int count) in setRuns()
264 if (runs[2] == SkRegion::kRunTypeSentinel) // should be first left... in setRuns()
277 if (stop[-4] == SkRegion::kRunTypeSentinel) // eek, stop[-3] was a bottom with no x-runs in setRuns()
279 stop[-3] = SkRegion::kRunTypeSentinel; // kill empty last span in setRuns()
308 while (*r < SkRegion::kRunTypeSentinel) in setRuns()
311 while (*r < SkRegion::kRunTypeSentinel) in setRuns()
334 void SkRegion::BuildRectRuns(const SkIRect& bounds, in BuildRectRuns()
345 static SkRegion::RunType* find_scanline(const SkRegion::RunType runs[], int y) in find_scanline()
352 if (runs[0] == SkRegion::kRunTypeSentinel) in find_scanline()
355 return (SkRegion::RunType*)&runs[1]; in find_scanline()
361 bool SkRegion::contains(int32_t x, int32_t y) const in contains()
384 bool SkRegion::contains(const SkIRect& r) const in contains()
386 SkRegion tmp(r); in contains()
391 bool SkRegion::contains(const SkRegion& rgn) const in contains()
399 SkRegion tmp; in contains()
405 const SkRegion::RunType* SkRegion::getRuns(RunType tmpStorage[], int* count) const in getRuns()
430 bool SkRegion::intersects(const SkIRect& r) const { in intersects()
444 SkRegion tmp; in intersects()
448 bool SkRegion::intersects(const SkRegion& rgn) const { in intersects()
464 SkRegion tmp; in intersects()
470 bool operator==(const SkRegion& a, const SkRegion& b) { in operator ==()
481 const SkRegion::RunHead* ah = a.fRunHead; in operator ==()
482 const SkRegion::RunHead* bh = b.fRunHead; in operator ==()
494 ah->fRunCount * sizeof(SkRegion::RunType)); in operator ==()
497 void SkRegion::translate(int dx, int dy, SkRegion* dst) const { in translate()
512 SkRegion tmp; in translate()
523 *druns++ = (SkRegion::RunType)(*sruns++ + dy); // top in translate()
529 *druns++ = (SkRegion::RunType)(bottom + dy); // bottom; in translate()
535 *druns++ = (SkRegion::RunType)(x + dx); in translate()
536 *druns++ = (SkRegion::RunType)(*sruns++ + dx); in translate()
551 bool SkRegion::setRects(const SkIRect rects[], int count) { in setRects()
573 SkASSERT(left == SkRegion::kRunTypeSentinel || left < rite); in assert_valid_pair()
580 const SkRegion::RunType* fA_runs;
581 const SkRegion::RunType* fB_runs;
585 void init(const SkRegion::RunType a_runs[], const SkRegion::RunType b_runs[]) in init()
598 SkASSERT(fA_left <= SkRegion::kRunTypeSentinel); in done()
599 SkASSERT(fB_left <= SkRegion::kRunTypeSentinel); in done()
600 return fA_left == SkRegion::kRunTypeSentinel && fB_left == SkRegion::kRunTypeSentinel; in done()
682 static SkRegion::RunType* operate_on_span(const SkRegion::RunType a_runs[], in operate_on_span()
683 const SkRegion::RunType b_runs[], in operate_on_span()
684 SkRegion::RunType dst[], in operate_on_span()
705 *dst++ = (SkRegion::RunType)(left); in operate_on_span()
706 *dst++ = (SkRegion::RunType)(rite); in operate_on_span()
710 dst[-1] = (SkRegion::RunType)(rite); in operate_on_span()
714 *dst++ = SkRegion::kRunTypeSentinel; in operate_on_span()
734 RgnOper(int top, SkRegion::RunType dst[], SkRegion::Op op) in RgnOper()
737 SkASSERT(SkRegion::kDifference_Op == 0); in RgnOper()
738 SkASSERT(SkRegion::kIntersect_Op == 1); in RgnOper()
739 SkASSERT(SkRegion::kUnion_Op == 2); in RgnOper()
740 SkASSERT(SkRegion::kXOR_Op == 3); in RgnOper()
746 fTop = (SkRegion::RunType)(top); // just a first guess, we might update this in RgnOper()
752 void addSpan(int bottom, const SkRegion::RunType a_runs[], const SkRegion::RunType b_runs[]) in addSpan()
754SkRegion::RunType* start = fPrevDst + fPrevLen + 1; // skip X values and slot for the next Y in addSpan()
755 SkRegion::RunType* stop = operate_on_span(a_runs, b_runs, start, fMin, fMax); in addSpan()
758 …if (fPrevLen == len && !memcmp(fPrevDst, start, len * sizeof(SkRegion::RunType))) // update Y va… in addSpan()
759 fPrevDst[-1] = (SkRegion::RunType)(bottom); in addSpan()
763 fTop = (SkRegion::RunType)(bottom); // just update our bottom in addSpan()
765 start[-1] = (SkRegion::RunType)(bottom); in addSpan()
775 fPrevDst[fPrevLen] = SkRegion::kRunTypeSentinel; in flush()
782 SkRegion::RunType* fStartDst;
783 SkRegion::RunType* fPrevDst;
785 SkRegion::RunType fTop;
788 static int operate( const SkRegion::RunType a_runs[], in operate()
789 const SkRegion::RunType b_runs[], in operate()
790 SkRegion::RunType dst[], in operate()
791 SkRegion::Op op) in operate()
793 const SkRegion::RunType gSentinel[] = { in operate()
794 SkRegion::kRunTypeSentinel, in operate()
814 int prevBot = SkRegion::kRunTypeSentinel; // so we fail the first test in operate()
816 while (a_bot < SkRegion::kRunTypeSentinel || b_bot < SkRegion::kRunTypeSentinel) in operate()
819 const SkRegion::RunType* run0 = gSentinel; in operate()
820 const SkRegion::RunType* run1 = gSentinel; in operate()
883 if (a_bot == SkRegion::kRunTypeSentinel) in operate()
891 if (b_bot == SkRegion::kRunTypeSentinel) in operate()
937 bool SkRegion::op(const SkRegion& rgnaOrig, const SkRegion& rgnbOrig, Op op) in op()
947 const SkRegion* rgna = &rgnaOrig; in op()
948 const SkRegion* rgnb = &rgnbOrig; in op()
954 SkTSwap<const SkRegion*>(rgna, rgnb); in op()
1021 uint32_t SkRegion::flatten(void* storage) const { in flatten()
1051 uint32_t SkRegion::unflatten(const void* storage) { in unflatten()
1053 SkRegion tmp; in unflatten()
1072 const SkRegion& SkRegion::GetEmptyRegion() { in GetEmptyRegion()
1073 static SkRegion gEmpty; in GetEmptyRegion()
1081 static const SkRegion::RunType* validate_line(const SkRegion::RunType run[], const SkIRect& bounds) in validate_line()
1089 if (*run != SkRegion::kRunTypeSentinel) in validate_line()
1099 } while (*run < SkRegion::kRunTypeSentinel); in validate_line()
1104 void SkRegion::validate() const in validate()
1142 void SkRegion::dump() const in dump()
1163 SkRegion::Iterator::Iterator(const SkRegion& rgn) { in Iterator()
1167 bool SkRegion::Iterator::rewind() { in rewind()
1175 void SkRegion::Iterator::reset(const SkRegion& rgn) { in reset()
1192 void SkRegion::Iterator::next() { in next()
1230 SkRegion::Cliperator::Cliperator(const SkRegion& rgn, const SkIRect& clip) in Cliperator()
1246 void SkRegion::Cliperator::next() { in next()
1269 static SkRegion::RunType* find_y(const SkRegion::RunType runs[], int y) { in find_y()
1275 if (bot == SkRegion::kRunTypeSentinel || in find_y()
1276 *runs == SkRegion::kRunTypeSentinel) { in find_y()
1279 return (SkRegion::RunType*)runs; in find_y()
1287 SkRegion::Spanerator::Spanerator(const SkRegion& rgn, int y, int left, in Spanerator()
1308 const SkRegion::RunType* runs = find_y( in Spanerator()
1333 bool SkRegion::Spanerator::next(int* left, int* right) { in next()
1349 const SkRegion::RunType* runs = fRuns; in next()
1372 bool SkRegion::debugSetRuns(const RunType runs[], int count) { in debugSetRuns()