OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkRegionPriv_DEFINED | 10 #ifndef SkRegionPriv_DEFINED |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 // skip the entire line [B N [L R] S] | 136 // skip the entire line [B N [L R] S] |
137 runs += 1 + 1 + intervals * 2 + 1; | 137 runs += 1 + 1 + intervals * 2 + 1; |
138 return const_cast<SkRegion::RunType*>(runs); | 138 return const_cast<SkRegion::RunType*>(runs); |
139 } | 139 } |
140 | 140 |
141 | 141 |
142 /** | 142 /** |
143 * Return the scanline that contains the Y value. This requires that the Y | 143 * Return the scanline that contains the Y value. This requires that the Y |
144 * value is already known to be contained within the bounds of the region, | 144 * value is already known to be contained within the bounds of the region, |
145 * and so this routine never returns NULL. | 145 * and so this routine never returns nullptr. |
146 * | 146 * |
147 * It returns the beginning of the scanline, starting with its Bottom value
. | 147 * It returns the beginning of the scanline, starting with its Bottom value
. |
148 */ | 148 */ |
149 SkRegion::RunType* findScanline(int y) const { | 149 SkRegion::RunType* findScanline(int y) const { |
150 const RunType* runs = this->readonly_runs(); | 150 const RunType* runs = this->readonly_runs(); |
151 | 151 |
152 // if the top-check fails, we didn't do a quick check on the bounds | 152 // if the top-check fails, we didn't do a quick check on the bounds |
153 SkASSERT(y >= runs[0]); | 153 SkASSERT(y >= runs[0]); |
154 | 154 |
155 runs += 1; // skip top-Y | 155 runs += 1; // skip top-Y |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 bounds->fRight = rite; | 227 bounds->fRight = rite; |
228 bounds->fBottom = bot; | 228 bounds->fBottom = bot; |
229 } | 229 } |
230 | 230 |
231 private: | 231 private: |
232 int32_t fYSpanCount; | 232 int32_t fYSpanCount; |
233 int32_t fIntervalCount; | 233 int32_t fIntervalCount; |
234 }; | 234 }; |
235 | 235 |
236 #endif | 236 #endif |
OLD | NEW |