Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: src/pathops/SkOpSegment.h

Issue 2426753002: break ambiguous angle sorting loop (Closed)
Patch Set: fix linux warning Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698