| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } else if (SkPath::kMove_Verb == verb) { | 283 } else if (SkPath::kMove_Verb == verb) { |
| 284 if (top > pts[0].fY) { | 284 if (top > pts[0].fY) { |
| 285 top = pts[0].fY; | 285 top = pts[0].fY; |
| 286 } else if (bot < pts[0].fY) { | 286 } else if (bot < pts[0].fY) { |
| 287 bot = pts[0].fY; | 287 bot = pts[0].fY; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 SkASSERT(top <= bot); | 291 SkASSERT(top <= bot); |
| 292 | 292 |
| 293 *itop = SkScalarRound(top); | 293 *itop = SkScalarRoundToInt(top); |
| 294 *ibot = SkScalarRound(bot); | 294 *ibot = SkScalarRoundToInt(bot); |
| 295 return maxEdges; | 295 return maxEdges; |
| 296 } | 296 } |
| 297 | 297 |
| 298 bool SkRegion::setPath(const SkPath& path, const SkRegion& clip) { | 298 bool SkRegion::setPath(const SkPath& path, const SkRegion& clip) { |
| 299 SkDEBUGCODE(this->validate();) | 299 SkDEBUGCODE(this->validate();) |
| 300 | 300 |
| 301 if (clip.isEmpty()) { | 301 if (clip.isEmpty()) { |
| 302 return this->setEmpty(); | 302 return this->setEmpty(); |
| 303 } | 303 } |
| 304 | 304 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 #endif | 508 #endif |
| 509 | 509 |
| 510 path->incReserve(count << 1); | 510 path->incReserve(count << 1); |
| 511 do { | 511 do { |
| 512 SkASSERT(count > 1); | 512 SkASSERT(count > 1); |
| 513 count -= extract_path(start, stop, path); | 513 count -= extract_path(start, stop, path); |
| 514 } while (count > 0); | 514 } while (count > 0); |
| 515 | 515 |
| 516 return true; | 516 return true; |
| 517 } | 517 } |
| OLD | NEW |