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

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

Issue 1408923003: Revert of path ops: fix conic weight and partial coincidence (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/SkPathOpsTSect.h ('k') | tests/PathOpsSkpTest.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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 #endif 280 #endif
281 const SkPoint* last = nullptr; 281 const SkPoint* last = nullptr;
282 int wind = 0; 282 int wind = 0;
283 int oppWind = 0; 283 int oppWind = 0;
284 for (int index = 0; index < count; ++index) { 284 for (int index = 0; index < count; ++index) {
285 hit = sorted[index]; 285 hit = sorted[index];
286 if (!hit->fValid) { 286 if (!hit->fValid) {
287 return false; 287 return false;
288 } 288 }
289 bool ccw = ccw_dxdy(hit->fSlope, dir); 289 bool ccw = ccw_dxdy(hit->fSlope, dir);
290 // SkASSERT(!approximately_zero(hit->fT) || !hit->fValid); 290 SkASSERT(!approximately_zero(hit->fT) || !hit->fValid);
291 SkOpSpan* span = hit->fSpan; 291 SkOpSpan* span = hit->fSpan;
292 SkOpSegment* hitSegment = span->segment(); 292 SkOpSegment* hitSegment = span->segment();
293 if (!span) { 293 if (!span) {
294 return false; 294 return false;
295 } 295 }
296 if (span->windValue() == 0 && span->oppValue() == 0) { 296 if (span->windValue() == 0 && span->oppValue() == 0) {
297 continue; 297 continue;
298 } 298 }
299 if (last && SkDPoint::ApproximatelyEqual(*last, hit->fPt)) { 299 if (last && SkDPoint::ApproximatelyEqual(*last, hit->fPt)) {
300 return false; 300 return false;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 continue; 398 continue;
399 } 399 }
400 SkOpSpan* result = contour->findSortableTop(contourHead); 400 SkOpSpan* result = contour->findSortableTop(contourHead);
401 if (result) { 401 if (result) {
402 return result; 402 return result;
403 } 403 }
404 } while ((contour = contour->next())); 404 } while ((contour = contour->next()));
405 } 405 }
406 return nullptr; 406 return nullptr;
407 } 407 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | tests/PathOpsSkpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698