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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace GrTest { | 24 namespace GrTest { |
25 /** | 25 /** |
26 * A helper for use in Test functions. | 26 * A helper for use in Test functions. |
27 */ | 27 */ |
28 const SkMatrix& TestMatrix(SkRandom*); | 28 const SkMatrix& TestMatrix(SkRandom*); |
29 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*); | 29 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*); |
30 const SkMatrix& TestMatrixRectStaysRect(SkRandom*); | 30 const SkMatrix& TestMatrixRectStaysRect(SkRandom*); |
31 const SkMatrix& TestMatrixInvertible(SkRandom*); | 31 const SkMatrix& TestMatrixInvertible(SkRandom*); |
32 const SkRect& TestRect(SkRandom*); | 32 const SkRect& TestRect(SkRandom*); |
| 33 const SkRect& TestSquare(SkRandom*); |
33 const SkRRect& TestRRectSimple(SkRandom*); | 34 const SkRRect& TestRRectSimple(SkRandom*); |
34 const SkPath& TestPath(SkRandom*); | 35 const SkPath& TestPath(SkRandom*); |
35 const SkPath& TestPathConvex(SkRandom*); | 36 const SkPath& TestPathConvex(SkRandom*); |
36 SkStrokeRec TestStrokeRec(SkRandom*); | 37 SkStrokeRec TestStrokeRec(SkRandom*); |
37 | 38 |
38 } | 39 } |
39 | 40 |
40 static inline GrColor GrRandomColor(SkRandom* random) { | 41 static inline GrColor GrRandomColor(SkRandom* random) { |
41 // There are only a few cases of random colors which interest us | 42 // There are only a few cases of random colors which interest us |
42 enum ColorMode { | 43 enum ColorMode { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 break; | 94 break; |
94 case kRandom_CoverageMode: | 95 case kRandom_CoverageMode: |
95 coverage = random->nextULessThan(256); | 96 coverage = random->nextULessThan(256); |
96 break; | 97 break; |
97 } | 98 } |
98 return coverage; | 99 return coverage; |
99 } | 100 } |
100 | 101 |
101 #endif | 102 #endif |
102 #endif | 103 #endif |
OLD | NEW |