blob: 569edb7e32e29e4200df65ee1c95254ec672002b [file] [log] [blame]
caryclark@google.com07393ca2013-04-08 11:47:37 +00001/*
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 "SkOpContour.h"
caryclark@google.comd892bd82013-06-17 14:10:36 +000011#include "SkTDArray.h"
caryclark@google.com07393ca2013-04-08 11:47:37 +000012
13class SkPathWriter;
14
15void Assemble(const SkPathWriter& path, SkPathWriter* simple);
caryclark@google.comd892bd82013-06-17 14:10:36 +000016// FIXME: find chase uses insert, so it can't be converted to SkTArray yet
caryclark@google.com07393ca2013-04-08 11:47:37 +000017SkOpSegment* FindChase(SkTDArray<SkOpSpan*>& chase, int& tIndex, int& endIndex);
caryclark@google.comd892bd82013-06-17 14:10:36 +000018SkOpSegment* FindSortableTop(const SkTArray<SkOpContour*, true>& contourList, bool* firstContour,
caryclark@google.com07393ca2013-04-08 11:47:37 +000019 int* index, int* endIndex, SkPoint* topLeft, bool* unsortable,
20 bool* done, bool binary);
caryclark@google.comd892bd82013-06-17 14:10:36 +000021SkOpSegment* FindUndone(SkTArray<SkOpContour*, true>& contourList, int* start, int* end);
22void FixOtherTIndex(SkTArray<SkOpContour*, true>* contourList);
23void MakeContourList(SkTArray<SkOpContour>& contours, SkTArray<SkOpContour*, true>& list,
caryclark@google.com07393ca2013-04-08 11:47:37 +000024 bool evenOdd, bool oppEvenOdd);
caryclark@google.comd892bd82013-06-17 14:10:36 +000025void SortSegments(SkTArray<SkOpContour*, true>* contourList);
caryclark@google.com07393ca2013-04-08 11:47:37 +000026
caryclark@google.coma5e55922013-05-07 18:51:31 +000027#if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY
caryclark@google.comd892bd82013-06-17 14:10:36 +000028void DebugShowActiveSpans(SkTArray<SkOpContour*, true>& contourList);
caryclark@google.com07393ca2013-04-08 11:47:37 +000029#endif
30
31#endif