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

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

Issue 1140383002: fix builder winding again (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/SkPathOpsTypes.h ('k') | tests/PathOpsBuilderTest.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 2015 Google Inc. 2 * Copyright 2015 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 7
8 // given a prospective edge, compute its initial winding by projecting a ray 8 // given a prospective edge, compute its initial winding by projecting a ray
9 // if the ray hits another edge 9 // if the ray hits another edge
10 // if the edge doesn't have a winding yet, hop up to that edge and start ove r 10 // if the edge doesn't have a winding yet, hop up to that edge and start ove r
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 hitSegment->contour()->setCcw(ccw); 346 hitSegment->contour()->setCcw(ccw);
347 } else { 347 } else {
348 (void) hitSegment->markAndChaseWinding(span, span->next(), windS um, oppSum, NULL); 348 (void) hitSegment->markAndChaseWinding(span, span->next(), windS um, oppSum, NULL);
349 (void) hitSegment->markAndChaseWinding(span->next(), span, windS um, oppSum, NULL); 349 (void) hitSegment->markAndChaseWinding(span->next(), span, windS um, oppSum, NULL);
350 } 350 }
351 } 351 }
352 if (operand) { 352 if (operand) {
353 SkTSwap(wind, oppWind); 353 SkTSwap(wind, oppWind);
354 } 354 }
355 last = &hit->fPt; 355 last = &hit->fPt;
356 this->globalState()->bumpNested();
356 } 357 }
357 return true; 358 return true;
358 } 359 }
359 360
360 SkOpSpan* SkOpSegment::findSortableTop(SkOpContour* contourHead) { 361 SkOpSpan* SkOpSegment::findSortableTop(SkOpContour* contourHead) {
361 SkOpSpan* span = &fHead; 362 SkOpSpan* span = &fHead;
362 SkOpSpanBase* next; 363 SkOpSpanBase* next;
363 do { 364 do {
364 next = span->next(); 365 next = span->next();
365 if (span->done()) { 366 if (span->done()) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 continue; 398 continue;
398 } 399 }
399 SkOpSpan* result = contour->findSortableTop(contourHead); 400 SkOpSpan* result = contour->findSortableTop(contourHead);
400 if (result) { 401 if (result) {
401 return result; 402 return result;
402 } 403 }
403 } while ((contour = contour->next())); 404 } while ((contour = contour->next()));
404 } 405 }
405 return NULL; 406 return NULL;
406 } 407 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTypes.h ('k') | tests/PathOpsBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698