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 
10 #include "SkOpAngle.h"
11 #include "SkTDArray.h"
12 
13 class SkOpCoincidence;
14 class SkOpContour;
15 class SkPathWriter;
16 
17 const SkOpAngle* AngleWinding(SkOpSpanBase* start, SkOpSpanBase* end, int* windingPtr,
18                               bool* sortable);
19 void Assemble(const SkPathWriter& path, SkPathWriter* simple);
20 SkOpSegment* FindChase(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** startPtr,
21                        SkOpSpanBase** endPtr);
22 SkOpSpan* FindSortableTop(SkOpContourHead* );
23 SkOpSegment* FindUndone(SkOpContourHead* , SkOpSpanBase** startPtr,
24                         SkOpSpanBase** endPtr);
25 bool SortContourList(SkOpContourHead** , bool evenOdd, bool oppEvenOdd);
26 bool HandleCoincidence(SkOpContourHead* , SkOpCoincidence* , SkChunkAlloc* );
27 bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result, bool expectSuccess);
28 #if DEBUG_ACTIVE_SPANS
29 void DebugShowActiveSpans(SkOpContourHead* );
30 #endif
31 
32 #endif
33