• Home
  • Raw
  • Download

Lines Matching refs:runs

76 static SkRegionPriv::RunType* skip_intervals(const SkRegionPriv::RunType runs[]) {  in skip_intervals()  argument
77 int intervals = runs[-1]; in skip_intervals()
80 SkASSERT(runs[0] < runs[1]); in skip_intervals()
81 SkASSERT(runs[1] < SkRegion_kRunTypeSentinel); in skip_intervals()
84 SkASSERT(SkRegion_kRunTypeSentinel == runs[0]); in skip_intervals()
87 runs += intervals * 2 + 1; in skip_intervals()
88 return const_cast<SkRegionPriv::RunType*>(runs); in skip_intervals()
91 bool SkRegion::RunsAreARect(const SkRegion::RunType runs[], int count, in RunsAreARect() argument
93 assert_sentinel(runs[0], false); // top in RunsAreARect()
97 assert_sentinel(runs[1], false); // bottom in RunsAreARect()
98 SkASSERT(1 == runs[2]); in RunsAreARect()
99 assert_sentinel(runs[3], false); // left in RunsAreARect()
100 assert_sentinel(runs[4], false); // right in RunsAreARect()
101 assert_sentinel(runs[5], true); in RunsAreARect()
102 assert_sentinel(runs[6], true); in RunsAreARect()
104 SkASSERT(runs[0] < runs[1]); // valid height in RunsAreARect()
105 SkASSERT(runs[3] < runs[4]); // valid width in RunsAreARect()
107 bounds->setLTRB(runs[3], runs[0], runs[4], runs[1]); in RunsAreARect()
271 bool SkRegion::setRuns(RunType runs[], int count) { in setRuns() argument
277 assert_sentinel(runs[count-1], true); in setRuns()
284 RunType* stop = runs + count; in setRuns()
285 assert_sentinel(runs[0], false); // top in setRuns()
286 assert_sentinel(runs[1], false); // bottom in setRuns()
289 if (runs[3] == SkRegion_kRunTypeSentinel) { // should be first left... in setRuns()
290 runs += 3; // skip empty initial span in setRuns()
291 runs[0] = runs[-2]; // set new top to prev bottom in setRuns()
292 assert_sentinel(runs[1], false); // bot: a sentinal would mean two in a row in setRuns()
293 assert_sentinel(runs[2], false); // intervalcount in setRuns()
294 assert_sentinel(runs[3], false); // left in setRuns()
295 assert_sentinel(runs[4], false); // right in setRuns()
312 count = (int)(stop - runs); in setRuns()
317 if (SkRegion::RunsAreARect(runs, count, &fBounds)) { in setRuns()
332 memcpy(fRunHead->writable_runs(), runs, count * sizeof(RunType)); in setRuns()
346 RunType runs[kRectRegionRuns]) { in BuildRectRuns()
347 runs[0] = bounds.fTop; in BuildRectRuns()
348 runs[1] = bounds.fBottom; in BuildRectRuns()
349 runs[2] = 1; // 1 interval for this scanline in BuildRectRuns()
350 runs[3] = bounds.fLeft; in BuildRectRuns()
351 runs[4] = bounds.fRight; in BuildRectRuns()
352 runs[5] = SkRegion_kRunTypeSentinel; in BuildRectRuns()
353 runs[6] = SkRegion_kRunTypeSentinel; in BuildRectRuns()
367 const RunType* runs = fRunHead->findScanline(y); in contains() local
370 runs += 2; in contains()
379 if (x < runs[0]) { in contains()
382 if (x < runs[1]) { in contains()
385 runs += 2; in contains()
390 static SkRegionPriv::RunType scanline_bottom(const SkRegionPriv::RunType runs[]) { in scanline_bottom() argument
391 return runs[0]; in scanline_bottom()
394 static const SkRegionPriv::RunType* scanline_next(const SkRegionPriv::RunType runs[]) { in scanline_next() argument
396 return runs + 2 + runs[1] * 2 + 1; in scanline_next()
399 static bool scanline_contains(const SkRegionPriv::RunType runs[], in scanline_contains() argument
401 runs += 2; // skip Bottom and IntervalCount in scanline_contains()
403 if (L < runs[0]) { in scanline_contains()
406 if (R <= runs[1]) { in scanline_contains()
409 runs += 2; in scanline_contains()
462 const RunType* runs = tmpStorage; in getRuns() local
471 runs = fRunHead->readonly_runs(); in getRuns()
474 return runs; in getRuns()
479 static bool scanline_intersects(const SkRegionPriv::RunType runs[], in scanline_intersects() argument
481 runs += 2; // skip Bottom and IntervalCount in scanline_intersects()
483 if (R <= runs[0]) { in scanline_intersects()
486 if (L < runs[1]) { in scanline_intersects()
489 runs += 2; in scanline_intersects()
768 static int distance_to_sentinel(const SkRegionPriv::RunType* runs) { in distance_to_sentinel() argument
769 const SkRegionPriv::RunType* ptr = runs; in distance_to_sentinel()
771 return ptr - runs; in distance_to_sentinel()
1194 static bool validate_run(const int32_t* runs, in validate_run() argument
1206 if (runs[runCount - 1] != SkRegion_kRunTypeSentinel || in validate_run()
1207 runs[runCount - 2] != SkRegion_kRunTypeSentinel) { in validate_run()
1210 const int32_t* const end = runs + runCount; in validate_run()
1213 rect.fTop = *runs++; in validate_run()
1225 rect.fBottom = *runs++; in validate_run()
1236 int32_t xIntervals = *runs++; in validate_run()
1237 SkASSERT(runs < end); in validate_run()
1238 if (xIntervals < 0 || xIntervals > intervalCount || runs + 1 + 2 * xIntervals > end) { in validate_run()
1245 rect.fLeft = *runs++; in validate_run()
1246 rect.fRight = *runs++; in validate_run()
1257 if (*runs++ != SkRegion_kRunTypeSentinel) { in validate_run()
1261 SkASSERT(runs < end); in validate_run()
1262 } while (*runs != SkRegion_kRunTypeSentinel); in validate_run()
1263 ++runs; in validate_run()
1267 SkASSERT(runs == end); // if ySpanCount && intervalCount are right, must be correct length. in validate_run()
1339 const RunType* runs = fRunHead->readonly_runs(); in dump() local
1341 SkDebugf(" %d", runs[i]); in dump()
1391 const RunType* runs = fRuns; in next() local
1393 if (runs[0] < SkRegion_kRunTypeSentinel) { // valid X value in next()
1394 fRect.fLeft = runs[0]; in next()
1395 fRect.fRight = runs[1]; in next()
1396 runs += 2; in next()
1398 runs += 1; in next()
1399 if (runs[0] < SkRegion_kRunTypeSentinel) { // valid Y value in next()
1400 int intervals = runs[1]; in next()
1402 fRect.fTop = runs[0]; in next()
1403 runs += 3; in next()
1408 fRect.fBottom = runs[0]; in next()
1409 assert_sentinel(runs[2], false); in next()
1410 assert_sentinel(runs[3], false); in next()
1411 fRect.fLeft = runs[2]; in next()
1412 fRect.fRight = runs[3]; in next()
1413 runs += 4; in next()
1418 fRuns = runs; in next()
1481 const SkRegion::RunType* runs = rgn.fRunHead->findScanline(y); in Spanerator() local
1482 runs += 2; // skip Bottom and IntervalCount in Spanerator()
1485 if (runs[0] >= right) { in Spanerator()
1489 if (runs[1] <= left) { in Spanerator()
1490 runs += 2; in Spanerator()
1494 fRuns = runs; in Spanerator()
1520 const SkRegion::RunType* runs = fRuns; in next() local
1522 if (runs[0] >= fRight) { in next()
1527 SkASSERT(runs[1] > fLeft); in next()
1530 *left = std::max(fLeft, runs[0]); in next()
1533 *right = std::min(fRight, runs[1]); in next()
1535 fRuns = runs + 2; in next()