OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 7 |
8 #ifndef GrTestUtils_DEFINED | 8 #ifndef GrTestUtils_DEFINED |
9 #define GrTestUtils_DEFINED | 9 #define GrTestUtils_DEFINED |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 struct SkRect; | 25 struct SkRect; |
26 | 26 |
27 namespace GrTest { | 27 namespace GrTest { |
28 /** | 28 /** |
29 * Helpers for use in Test functions. | 29 * Helpers for use in Test functions. |
30 */ | 30 */ |
31 const SkMatrix& TestMatrix(SkRandom*); | 31 const SkMatrix& TestMatrix(SkRandom*); |
32 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*); | 32 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*); |
33 const SkMatrix& TestMatrixRectStaysRect(SkRandom*); | 33 const SkMatrix& TestMatrixRectStaysRect(SkRandom*); |
34 const SkMatrix& TestMatrixInvertible(SkRandom*); | 34 const SkMatrix& TestMatrixInvertible(SkRandom*); |
| 35 const SkMatrix& TestMatrixPerspective(SkRandom*); |
35 const SkRect& TestRect(SkRandom*); | 36 const SkRect& TestRect(SkRandom*); |
36 const SkRect& TestSquare(SkRandom*); | 37 const SkRect& TestSquare(SkRandom*); |
37 const SkRRect& TestRRectSimple(SkRandom*); | 38 const SkRRect& TestRRectSimple(SkRandom*); |
38 const SkPath& TestPath(SkRandom*); | 39 const SkPath& TestPath(SkRandom*); |
39 const SkPath& TestPathConvex(SkRandom*); | 40 const SkPath& TestPathConvex(SkRandom*); |
40 SkStrokeRec TestStrokeRec(SkRandom*); | 41 SkStrokeRec TestStrokeRec(SkRandom*); |
41 /** Creates styles with dash path effects and null path effects */ | 42 /** Creates styles with dash path effects and null path effects */ |
42 void TestStyle(SkRandom*, GrStyle*); | 43 void TestStyle(SkRandom*, GrStyle*); |
43 | 44 |
44 // We have a simplified dash path effect here to avoid relying on SkDashPathEffe
ct which | 45 // We have a simplified dash path effect here to avoid relying on SkDashPathEffe
ct which |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 break; | 125 break; |
125 case kRandom_CoverageMode: | 126 case kRandom_CoverageMode: |
126 coverage = random->nextULessThan(256); | 127 coverage = random->nextULessThan(256); |
127 break; | 128 break; |
128 } | 129 } |
129 return coverage; | 130 return coverage; |
130 } | 131 } |
131 | 132 |
132 #endif | 133 #endif |
133 #endif | 134 #endif |
OLD | NEW |