Lines Matching full:runs
25 static int compute_intervalcount(const SkRegion::RunType runs[]) {
26 const SkRegion::RunType* curr = runs;
32 return SkToInt((curr - runs) >> 1);
117 * Given a scanline (including its Bottom value at runs[0]), return the next
118 * scanline. Asserts that there is one (i.e. runs[0] < Sentinel)
120 static SkRegion::RunType* SkipEntireScanline(const SkRegion::RunType runs[]) {
122 SkASSERT(runs[0] < SkRegion::kRunTypeSentinel);
124 const int intervals = runs[1];
125 SkASSERT(runs[2 + intervals * 2] == SkRegion::kRunTypeSentinel);
128 int n = compute_intervalcount(&runs[2]);
134 runs += 1 + 1 + intervals * 2 + 1;
135 return const_cast<SkRegion::RunType*>(runs);
147 const RunType* runs = this->readonly_runs();
150 SkASSERT(y >= runs[0]);
152 runs += 1; // skip top-Y
154 int bottom = runs[0];
161 runs = SkipEntireScanline(runs);
163 return const_cast<SkRegion::RunType*>(runs);
166 // Copy src runs into us, computing interval counts and bounds along the way
168 RunType* runs = this->writable_runs();
169 bounds->fTop = *runs++;
178 bot = *runs++;
182 const int intervals = *runs++;
189 int n = compute_intervalcount(runs);
193 RunType L = runs[0];
199 runs += intervals * 2;
200 RunType R = runs[-1];
208 SkASSERT(SkRegion::kRunTypeSentinel == *runs);
209 runs += 1; // skip x-sentinel
212 } while (SkRegion::kRunTypeSentinel > *runs);
216 int runCount = SkToInt(runs - this->writable_runs() + 1);