| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|