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

Side by Side Diff: src/pathops/SkOpSpan.cpp

Issue 1405383004: fix path op conic bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix w cast Created 5 years, 1 month 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/SkOpSpan.h ('k') | src/pathops/SkPathOpsConic.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 2014 Google Inc. 2 * Copyright 2014 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 #include "SkOpCoincidence.h" 7 #include "SkOpCoincidence.h"
8 #include "SkOpContour.h" 8 #include "SkOpContour.h"
9 #include "SkOpSegment.h" 9 #include "SkOpSegment.h"
10 #include "SkPathWriter.h" 10 #include "SkPathWriter.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 SkASSERT(t != 1); 354 SkASSERT(t != 1);
355 initBase(segment, prev, t, pt); 355 initBase(segment, prev, t, pt);
356 fCoincident = this; 356 fCoincident = this;
357 fToAngle = nullptr; 357 fToAngle = nullptr;
358 fWindSum = fOppSum = SK_MinS32; 358 fWindSum = fOppSum = SK_MinS32;
359 fWindValue = 1; 359 fWindValue = 1;
360 fOppValue = 0; 360 fOppValue = 0;
361 fTopTTry = 0; 361 fTopTTry = 0;
362 fChased = fDone = false; 362 fChased = fDone = false;
363 segment->bumpCount(); 363 segment->bumpCount();
364 fAlreadyAdded = false;
364 } 365 }
365 366
366 void SkOpSpan::setOppSum(int oppSum) { 367 void SkOpSpan::setOppSum(int oppSum) {
367 SkASSERT(!final()); 368 SkASSERT(!final());
368 if (fOppSum != SK_MinS32 && fOppSum != oppSum) { 369 if (fOppSum != SK_MinS32 && fOppSum != oppSum) {
369 this->globalState()->setWindingFailed(); 370 this->globalState()->setWindingFailed();
370 return; 371 return;
371 } 372 }
372 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(oppSum) <= DEBUG_LIMIT_WIND_SUM); 373 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(oppSum) <= DEBUG_LIMIT_WIND_SUM);
373 fOppSum = oppSum; 374 fOppSum = oppSum;
374 } 375 }
375 376
376 void SkOpSpan::setWindSum(int windSum) { 377 void SkOpSpan::setWindSum(int windSum) {
377 SkASSERT(!final()); 378 SkASSERT(!final());
378 if (fWindSum != SK_MinS32 && fWindSum != windSum) { 379 if (fWindSum != SK_MinS32 && fWindSum != windSum) {
379 this->globalState()->setWindingFailed(); 380 this->globalState()->setWindingFailed();
380 return; 381 return;
381 } 382 }
382 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); 383 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM);
383 fWindSum = windSum; 384 fWindSum = windSum;
384 } 385 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpSpan.h ('k') | src/pathops/SkPathOpsConic.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698