| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkOpSegment_DEFINE | 7 #ifndef SkOpSegment_DEFINE |
| 8 #define SkOpSegment_DEFINE | 8 #define SkOpSegment_DEFINE |
| 9 | 9 |
| 10 #include "SkOpAngle.h" | 10 #include "SkOpAngle.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 if (*sumWinding == SK_MinS32) { | 364 if (*sumWinding == SK_MinS32) { |
| 365 return; | 365 return; |
| 366 } | 366 } |
| 367 *sumWinding -= deltaSum; | 367 *sumWinding -= deltaSum; |
| 368 } | 368 } |
| 369 | 369 |
| 370 void setUpWindings(SkOpSpanBase* start, SkOpSpanBase* end, int* sumMiWinding
, | 370 void setUpWindings(SkOpSpanBase* start, SkOpSpanBase* end, int* sumMiWinding
, |
| 371 int* maxWinding, int* sumWinding); | 371 int* maxWinding, int* sumWinding); |
| 372 void setUpWindings(SkOpSpanBase* start, SkOpSpanBase* end, int* sumMiWinding
, int* sumSuWinding, | 372 void setUpWindings(SkOpSpanBase* start, SkOpSpanBase* end, int* sumMiWinding
, int* sumSuWinding, |
| 373 int* maxWinding, int* sumWinding, int* oppMaxWinding, int
* oppSumWinding); | 373 int* maxWinding, int* sumWinding, int* oppMaxWinding, int
* oppSumWinding); |
| 374 void sortAngles(); | 374 bool sortAngles(); |
| 375 bool spansNearby(const SkOpSpanBase* ref, const SkOpSpanBase* check) const; | 375 bool spansNearby(const SkOpSpanBase* ref, const SkOpSpanBase* check) const; |
| 376 | 376 |
| 377 static int SpanSign(const SkOpSpanBase* start, const SkOpSpanBase* end) { | 377 static int SpanSign(const SkOpSpanBase* start, const SkOpSpanBase* end) { |
| 378 int result = start->t() < end->t() ? -start->upCast()->windValue() | 378 int result = start->t() < end->t() ? -start->upCast()->windValue() |
| 379 : end->upCast()->windValue(); | 379 : end->upCast()->windValue(); |
| 380 return result; | 380 return result; |
| 381 } | 381 } |
| 382 | 382 |
| 383 SkOpAngle* spanToAngle(SkOpSpanBase* start, SkOpSpanBase* end) { | 383 SkOpAngle* spanToAngle(SkOpSpanBase* start, SkOpSpanBase* end) { |
| 384 SkASSERT(start != end); | 384 SkASSERT(start != end); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis-
a-vis the ref seg | 449 mutable SkScalar fDebugBaseMin; // if > 0, the 1st t value in this seg vis-
a-vis the ref seg |
| 450 mutable SkScalar fDebugBaseMax; | 450 mutable SkScalar fDebugBaseMax; |
| 451 mutable int fDebugLastIndex; | 451 mutable int fDebugLastIndex; |
| 452 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base
has same sign | 452 mutable SkScalar fDebugLastMin; // if > 0, the last t -- next t val - base
has same sign |
| 453 mutable SkScalar fDebugLastMax; | 453 mutable SkScalar fDebugLastMax; |
| 454 #endif | 454 #endif |
| 455 SkDEBUGCODE(int fID); | 455 SkDEBUGCODE(int fID); |
| 456 }; | 456 }; |
| 457 | 457 |
| 458 #endif | 458 #endif |
| OLD | NEW |