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

Side by Side Diff: tests/PathOpsTestCommon.h

Issue 2426173002: fix fuzzers (Closed)
Patch Set: fix dm 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 | « tests/PathOpsQuadReduceOrderTest.cpp ('k') | tests/PathOpsThreeWayTest.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 PathOpsTestCommon_DEFINED 7 #ifndef PathOpsTestCommon_DEFINED
8 #define PathOpsTestCommon_DEFINED 8 #define PathOpsTestCommon_DEFINED
9 9
10 #include "SkPathOpsQuad.h" 10 #include "SkPathOpsQuad.h"
11 #include "SkTArray.h" 11 #include "SkTArray.h"
12 12
13 struct SkPathOpsBounds; 13 struct SkPathOpsBounds;
14 14
15 struct QuadPts {
16 static const int kPointCount = 3;
17 SkDPoint fPts[kPointCount];
18 };
19
20 struct ConicPts {
21 QuadPts fPts;
22 SkScalar fWeight;
23 };
24
25 struct CubicPts {
26 static const int kPointCount = 4;
27 SkDPoint fPts[kPointCount];
28 };
29
15 void CubicPathToQuads(const SkPath& cubicPath, SkPath* quadPath); 30 void CubicPathToQuads(const SkPath& cubicPath, SkPath* quadPath);
16 void CubicPathToSimple(const SkPath& cubicPath, SkPath* simplePath); 31 void CubicPathToSimple(const SkPath& cubicPath, SkPath* simplePath);
17 void CubicToQuads(const SkDCubic& cubic, double precision, SkTArray<SkDQuad, tru e>& quads); 32 void CubicToQuads(const SkDCubic& cubic, double precision, SkTArray<SkDQuad, tru e>& quads);
18 bool ValidBounds(const SkPathOpsBounds& ); 33 bool ValidBounds(const SkPathOpsBounds& );
19 bool ValidConic(const SkDConic& cubic); 34 bool ValidConic(const SkDConic& cubic);
20 bool ValidCubic(const SkDCubic& cubic); 35 bool ValidCubic(const SkDCubic& cubic);
21 bool ValidLine(const SkDLine& line); 36 bool ValidLine(const SkDLine& line);
22 bool ValidPoint(const SkDPoint& pt); 37 bool ValidPoint(const SkDPoint& pt);
23 bool ValidPoints(const SkPoint* pts, int count); 38 bool ValidPoints(const SkPoint* pts, int count);
24 bool ValidQuad(const SkDQuad& quad); 39 bool ValidQuad(const SkDQuad& quad);
25 bool ValidVector(const SkDVector& v); 40 bool ValidVector(const SkDVector& v);
26 41
27 #endif 42 #endif
OLDNEW
« no previous file with comments | « tests/PathOpsQuadReduceOrderTest.cpp ('k') | tests/PathOpsThreeWayTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698