| 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 /** | 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 SkRRect& TestRRectSimple(SkRandom*); | 33 const SkRRect& TestRRectSimple(SkRandom*); |
| 34 const SkPath& TestPath(SkRandom*); | 34 const SkPath& TestPath(SkRandom*); |
| 35 const SkPath& TestPathConvex(SkRandom*); |
| 35 SkStrokeRec TestStrokeRec(SkRandom*); | 36 SkStrokeRec TestStrokeRec(SkRandom*); |
| 36 | 37 |
| 37 } | 38 } |
| 38 | 39 |
| 39 static inline GrColor GrRandomColor(SkRandom* random) { | 40 static inline GrColor GrRandomColor(SkRandom* random) { |
| 40 // There are only a few cases of random colors which interest us | 41 // There are only a few cases of random colors which interest us |
| 41 enum ColorMode { | 42 enum ColorMode { |
| 42 kAllOnes_ColorMode, | 43 kAllOnes_ColorMode, |
| 43 kAllZeros_ColorMode, | 44 kAllZeros_ColorMode, |
| 44 kAlphaOne_ColorMode, | 45 kAlphaOne_ColorMode, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 break; | 93 break; |
| 93 case kRandom_CoverageMode: | 94 case kRandom_CoverageMode: |
| 94 coverage = random->nextULessThan(256); | 95 coverage = random->nextULessThan(256); |
| 95 break; | 96 break; |
| 96 } | 97 } |
| 97 return coverage; | 98 return coverage; |
| 98 } | 99 } |
| 99 | 100 |
| 100 #endif | 101 #endif |
| 101 #endif | 102 #endif |
| OLD | NEW |