Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: src/pathops/SkReduceOrder.h

Issue 2357353002: split tight quads and cubics (Closed)
Patch Set: fix linux build Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | src/pathops/SkReduceOrder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkReduceOrder_DEFINED 7 #ifndef SkReduceOrder_DEFINED
8 #define SkReduceOrder_DEFINED 8 #define SkReduceOrder_DEFINED
9 9
10 #include "SkPathOpsCubic.h" 10 #include "SkPathOpsCubic.h"
11 #include "SkPathOpsLine.h" 11 #include "SkPathOpsLine.h"
12 #include "SkPathOpsQuad.h" 12 #include "SkPathOpsQuad.h"
13 13
14 struct SkConic;
15
14 union SkReduceOrder { 16 union SkReduceOrder {
15 enum Quadratics { 17 enum Quadratics {
16 kNo_Quadratics, 18 kNo_Quadratics,
17 kAllow_Quadratics 19 kAllow_Quadratics
18 }; 20 };
19 21
20 int reduce(const SkDCubic& cubic, Quadratics); 22 int reduce(const SkDCubic& cubic, Quadratics);
21 int reduce(const SkDLine& line); 23 int reduce(const SkDLine& line);
22 int reduce(const SkDQuad& quad); 24 int reduce(const SkDQuad& quad);
23 25
24 static SkPath::Verb Conic(const SkPoint pts[3], SkScalar weight, SkPoint* re ducePts); 26 static SkPath::Verb Conic(const SkConic& conic, SkPoint* reducePts);
25 static SkPath::Verb Cubic(const SkPoint pts[4], SkPoint* reducePts); 27 static SkPath::Verb Cubic(const SkPoint pts[4], SkPoint* reducePts);
26 static SkPath::Verb Quad(const SkPoint pts[3], SkPoint* reducePts); 28 static SkPath::Verb Quad(const SkPoint pts[3], SkPoint* reducePts);
27 29
28 SkDLine fLine; 30 SkDLine fLine;
29 SkDQuad fQuad; 31 SkDQuad fQuad;
30 SkDCubic fCubic; 32 SkDCubic fCubic;
31 }; 33 };
32 34
33 #endif 35 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | src/pathops/SkReduceOrder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698