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

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

Issue 16951017: convert pathops to use SkSTArray where possible. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: pathops use SkTArray Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkPathOpsSimplify.cpp ('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 "SkPath.h" 10 #include "SkPath.h"
11 #include "SkPathOpsCubic.h" 11 #include "SkPathOpsCubic.h"
12 #include "SkPathOpsLine.h" 12 #include "SkPathOpsLine.h"
13 #include "SkPathOpsQuad.h" 13 #include "SkPathOpsQuad.h"
14 #include "SkTDArray.h" 14 #include "SkTArray.h"
15 15
16 union SkReduceOrder { 16 union SkReduceOrder {
17 enum Quadratics { 17 enum Quadratics {
18 kNo_Quadratics, 18 kNo_Quadratics,
19 kAllow_Quadratics 19 kAllow_Quadratics
20 }; 20 };
21 enum Style { 21 enum Style {
22 kStroke_Style, 22 kStroke_Style,
23 kFill_Style 23 kFill_Style
24 }; 24 };
25 25
26 int reduce(const SkDCubic& cubic, Quadratics, Style); 26 int reduce(const SkDCubic& cubic, Quadratics, Style);
27 int reduce(const SkDLine& line); 27 int reduce(const SkDLine& line);
28 int reduce(const SkDQuad& quad, Style); 28 int reduce(const SkDQuad& quad, Style);
29 29
30 static SkPath::Verb Cubic(const SkPoint pts[4], SkTDArray<SkPoint>* reducePt s); 30 static SkPath::Verb Cubic(const SkPoint pts[4], SkTArray<SkPoint, true>* red ucePts);
31 static SkPath::Verb Quad(const SkPoint pts[3], SkTDArray<SkPoint>* reducePts ); 31 static SkPath::Verb Quad(const SkPoint pts[3], SkTArray<SkPoint, true>* redu cePts);
32 32
33 SkDLine fLine; 33 SkDLine fLine;
34 SkDQuad fQuad; 34 SkDQuad fQuad;
35 SkDCubic fCubic; 35 SkDCubic fCubic;
36 }; 36 };
37 37
38 #endif 38 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsSimplify.cpp ('k') | src/pathops/SkReduceOrder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698