Lines Matching full:runs
48 static int compute_intervalcount(const SkRegionPriv::RunType runs[]) { in compute_intervalcount() argument
49 const SkRegionPriv::RunType* curr = runs; in compute_intervalcount()
55 return SkToInt((curr - runs) >> 1); in compute_intervalcount()
145 * Given a scanline (including its Bottom value at runs[0]), return the next
146 * scanline. Asserts that there is one (i.e. runs[0] < Sentinel)
148 static SkRegion::RunType* SkipEntireScanline(const SkRegion::RunType runs[]) { in SkipEntireScanline()
150 SkASSERT(runs[0] < SkRegion_kRunTypeSentinel); in SkipEntireScanline()
152 const int intervals = runs[1]; in SkipEntireScanline()
153 SkASSERT(runs[2 + intervals * 2] == SkRegion_kRunTypeSentinel); in SkipEntireScanline()
156 int n = compute_intervalcount(&runs[2]); in SkipEntireScanline()
162 runs += 1 + 1 + intervals * 2 + 1; in SkipEntireScanline()
163 return const_cast<SkRegion::RunType*>(runs); in SkipEntireScanline()
175 const RunType* runs = this->readonly_runs(); in findScanline() local
178 SkASSERT(y >= runs[0]); in findScanline()
180 runs += 1; // skip top-Y in findScanline()
182 int bottom = runs[0]; in findScanline()
189 runs = SkipEntireScanline(runs); in findScanline()
191 return const_cast<SkRegion::RunType*>(runs); in findScanline()
194 // Copy src runs into us, computing interval counts and bounds along the way
196 RunType* runs = this->writable_runs(); in computeRunBounds() local
197 bounds->fTop = *runs++; in computeRunBounds()
206 bot = *runs++; in computeRunBounds()
210 const int intervals = *runs++; in computeRunBounds()
217 int n = compute_intervalcount(runs); in computeRunBounds()
221 RunType L = runs[0]; in computeRunBounds()
227 runs += intervals * 2; in computeRunBounds()
228 RunType R = runs[-1]; in computeRunBounds()
236 SkASSERT(SkRegion_kRunTypeSentinel == *runs); in computeRunBounds()
237 runs += 1; // skip x-sentinel in computeRunBounds()
240 } while (SkRegion_kRunTypeSentinel > *runs); in computeRunBounds()
244 int runCount = SkToInt(runs - this->writable_runs() + 1); in computeRunBounds()