michael@0: /* michael@0: * Copyright 2012 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: #ifndef SkReduceOrder_DEFINED michael@0: #define SkReduceOrder_DEFINED michael@0: michael@0: #include "SkPath.h" michael@0: #include "SkPathOpsCubic.h" michael@0: #include "SkPathOpsLine.h" michael@0: #include "SkPathOpsQuad.h" michael@0: #include "SkTArray.h" michael@0: michael@0: union SkReduceOrder { michael@0: enum Quadratics { michael@0: kNo_Quadratics, michael@0: kAllow_Quadratics michael@0: }; michael@0: michael@0: int reduce(const SkDCubic& cubic, Quadratics); michael@0: int reduce(const SkDLine& line); michael@0: int reduce(const SkDQuad& quad); michael@0: michael@0: static SkPath::Verb Cubic(const SkPoint pts[4], SkPoint* reducePts); michael@0: static SkPath::Verb Quad(const SkPoint pts[3], SkPoint* reducePts); michael@0: michael@0: SkDLine fLine; michael@0: SkDQuad fQuad; michael@0: SkDCubic fCubic; michael@0: }; michael@0: michael@0: #endif