OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #ifndef SkOpContour_DEFINED | 7 #ifndef SkOpContour_DEFINED |
8 #define SkOpContour_DEFINED | 8 #define SkOpContour_DEFINED |
9 | 9 |
10 #include "SkOpSegment.h" | 10 #include "SkOpSegment.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 } | 262 } |
263 segment = segment->next(); | 263 segment = segment->next(); |
264 } while (segment); | 264 } while (segment); |
265 return result; | 265 return result; |
266 } | 266 } |
267 | 267 |
268 bool moveMultiples() { | 268 bool moveMultiples() { |
269 SkASSERT(fCount > 0); | 269 SkASSERT(fCount > 0); |
270 SkOpSegment* segment = &fHead; | 270 SkOpSegment* segment = &fHead; |
271 do { | 271 do { |
272 segment->moveMultiples(); | 272 if (!segment->moveMultiples()) { |
| 273 return false; |
| 274 } |
273 } while ((segment = segment->next())); | 275 } while ((segment = segment->next())); |
274 return true; | 276 return true; |
275 } | 277 } |
276 | 278 |
277 void moveNearby() { | 279 void moveNearby() { |
278 SkASSERT(fCount > 0); | 280 SkASSERT(fCount > 0); |
279 SkOpSegment* segment = &fHead; | 281 SkOpSegment* segment = &fHead; |
280 do { | 282 do { |
281 segment->moveNearby(); | 283 segment->moveNearby(); |
282 } while ((segment = segment->next())); | 284 } while ((segment = segment->next())); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 bool fXor; // set if original path had even-odd fill | 429 bool fXor; // set if original path had even-odd fill |
428 bool fOppXor; // set if opposite path had even-odd fill | 430 bool fOppXor; // set if opposite path had even-odd fill |
429 SkDEBUGCODE(int fID); | 431 SkDEBUGCODE(int fID); |
430 SkDEBUGCODE(mutable int fDebugIndent); | 432 SkDEBUGCODE(mutable int fDebugIndent); |
431 }; | 433 }; |
432 | 434 |
433 class SkOpContourHead : public SkOpContour { | 435 class SkOpContourHead : public SkOpContour { |
434 }; | 436 }; |
435 | 437 |
436 #endif | 438 #endif |
OLD | NEW |