| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | #ifndef SkPathOpsCommon_DEFINED |
| 8 | #define SkPathOpsCommon_DEFINED |
| 9 | |
| caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame^] | 10 | #include "SkOpAngle.h" |
| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 11 | #include "SkOpContour.h" |
| caryclark@google.com | d892bd8 | 2013-06-17 14:10:36 +0000 | [diff] [blame] | 12 | #include "SkTDArray.h" |
| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 13 | |
| 14 | class SkPathWriter; |
| 15 | |
| 16 | void Assemble(const SkPathWriter& path, SkPathWriter* simple); |
| caryclark@google.com | fa2aeee | 2013-07-15 13:29:13 +0000 | [diff] [blame] | 17 | void CheckEnds(SkTArray<SkOpContour*, true>* contourList); |
| caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame^] | 18 | void CheckTiny(SkTArray<SkOpContour*, true>* contourList); |
| caryclark@google.com | d892bd8 | 2013-06-17 14:10:36 +0000 | [diff] [blame] | 19 | // FIXME: find chase uses insert, so it can't be converted to SkTArray yet |
| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 20 | SkOpSegment* FindChase(SkTDArray<SkOpSpan*>& chase, int& tIndex, int& endIndex); |
| caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame^] | 21 | SkOpSegment* FindSortableTop(const SkTArray<SkOpContour*, true>& , SkOpAngle::IncludeType , |
| 22 | bool* firstContour, int* index, int* endIndex, SkPoint* topLeft, |
| 23 | bool* unsortable, bool* done); |
| caryclark@google.com | d892bd8 | 2013-06-17 14:10:36 +0000 | [diff] [blame] | 24 | SkOpSegment* FindUndone(SkTArray<SkOpContour*, true>& contourList, int* start, int* end); |
| 25 | void FixOtherTIndex(SkTArray<SkOpContour*, true>* contourList); |
| 26 | void MakeContourList(SkTArray<SkOpContour>& contours, SkTArray<SkOpContour*, true>& list, |
| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 27 | bool evenOdd, bool oppEvenOdd); |
| caryclark@google.com | d892bd8 | 2013-06-17 14:10:36 +0000 | [diff] [blame] | 28 | void SortSegments(SkTArray<SkOpContour*, true>* contourList); |
| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 29 | |
| caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 30 | #if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY |
| caryclark@google.com | d892bd8 | 2013-06-17 14:10:36 +0000 | [diff] [blame] | 31 | void DebugShowActiveSpans(SkTArray<SkOpContour*, true>& contourList); |
| caryclark@google.com | 07393ca | 2013-04-08 11:47:37 +0000 | [diff] [blame] | 32 | #endif |
| 33 | |
| 34 | #endif |