| 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 #include "SkRegionPriv.h" | 10 #include "SkRegionPriv.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 iter.next(); | 205 iter.next(); |
| 206 } | 206 } |
| 207 count += sprintf(result+count, ")"); | 207 count += sprintf(result+count, ")"); |
| 208 return result; | 208 return result; |
| 209 } | 209 } |
| 210 #endif | 210 #endif |
| 211 | 211 |
| 212 /////////////////////////////////////////////////////////////////////////////// | 212 /////////////////////////////////////////////////////////////////////////////// |
| 213 | 213 |
| 214 int SkRegion::count_runtype_values(int* itop, int* ibot) const { | 214 int SkRegion::count_runtype_values(int* itop, int* ibot) const { |
| 215 if (this == NULL) { | |
| 216 *itop = SK_MinS32; | |
| 217 *ibot = SK_MaxS32; | |
| 218 return 0; | |
| 219 } | |
| 220 | |
| 221 int maxT; | 215 int maxT; |
| 222 | 216 |
| 223 if (this->isRect()) { | 217 if (this->isRect()) { |
| 224 maxT = 2; | 218 maxT = 2; |
| 225 } else { | 219 } else { |
| 226 SkASSERT(this->isComplex()); | 220 SkASSERT(this->isComplex()); |
| 227 maxT = fRunHead->getIntervalCount() * 2; | 221 maxT = fRunHead->getIntervalCount() * 2; |
| 228 } | 222 } |
| 229 *itop = fBounds.fTop; | 223 *itop = fBounds.fTop; |
| 230 *ibot = fBounds.fBottom; | 224 *ibot = fBounds.fBottom; |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 bool SkRegion::debugSetRuns(const RunType runs[], int count) { | 1470 bool SkRegion::debugSetRuns(const RunType runs[], int count) { |
| 1477 // we need to make a copy, since the real method may modify the array, and | 1471 // we need to make a copy, since the real method may modify the array, and |
| 1478 // so it cannot be const. | 1472 // so it cannot be const. |
| 1479 | 1473 |
| 1480 SkAutoTArray<RunType> storage(count); | 1474 SkAutoTArray<RunType> storage(count); |
| 1481 memcpy(storage.get(), runs, count * sizeof(RunType)); | 1475 memcpy(storage.get(), runs, count * sizeof(RunType)); |
| 1482 return this->setRuns(storage.get(), count); | 1476 return this->setRuns(storage.get(), count); |
| 1483 } | 1477 } |
| 1484 | 1478 |
| 1485 #endif | 1479 #endif |
| OLD | NEW |