• Home
  • Raw
  • Download

Lines Matching refs:random

17 static const SkMatrix& test_matrix(SkRandom* random, bool includePerspective) {  in test_matrix()  argument
38 return gMatrices[random->nextULessThan(count)]; in test_matrix()
40 return gMatrices[random->nextULessThan(count - kPerspectiveCount)]; in test_matrix()
45 const SkMatrix& TestMatrix(SkRandom* random) { return test_matrix(random, true); } in TestMatrix() argument
47 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom* random) { in TestMatrixPreservesRightAngles() argument
70 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixPreservesRightAngles()
73 const SkMatrix& TestMatrixRectStaysRect(SkRandom* random) { in TestMatrixRectStaysRect() argument
96 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixRectStaysRect()
99 const SkMatrix& TestMatrixInvertible(SkRandom* random) { return test_matrix(random, false); } in TestMatrixInvertible() argument
101 const SkRect& TestRect(SkRandom* random) { in TestRect() argument
113 return gRects[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gRects)))]; in TestRect()
117 const SkRect& TestSquare(SkRandom* random) { in TestSquare() argument
125 return gRects[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gRects)))]; in TestSquare()
128 const SkRRect& TestRRectSimple(SkRandom* random) { in TestRRectSimple() argument
143 return gRRect[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gRRect)))]; in TestRRectSimple()
146 const SkPath& TestPath(SkRandom* random) { in TestPath() argument
184 return gPath[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gPath)))]; in TestPath()
187 const SkPath& TestPathConvex(SkRandom* random) { in TestPathConvex() argument
218 return gPath[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gPath)))]; in TestPathConvex()
221 static void randomize_stroke_rec(SkStrokeRec* rec, SkRandom* random) { in randomize_stroke_rec() argument
222 bool strokeAndFill = random->nextBool(); in randomize_stroke_rec()
223 SkScalar strokeWidth = random->nextBool() ? 0.f : 1.f; in randomize_stroke_rec()
226 SkPaint::Cap cap = SkPaint::Cap(random->nextULessThan(SkPaint::kCapCount)); in randomize_stroke_rec()
227 SkPaint::Join join = SkPaint::Join(random->nextULessThan(SkPaint::kJoinCount)); in randomize_stroke_rec()
228 SkScalar miterLimit = random->nextRangeScalar(1.f, 5.f); in randomize_stroke_rec()
232 SkStrokeRec TestStrokeRec(SkRandom* random) { in TestStrokeRec() argument
234 SkStrokeRec::InitStyle(random->nextULessThan(SkStrokeRec::kFill_InitStyle + 1)); in TestStrokeRec()
236 randomize_stroke_rec(&rec, random); in TestStrokeRec()
240 GrStrokeInfo TestStrokeInfo(SkRandom* random) { in TestStrokeInfo() argument
242 SkStrokeRec::InitStyle(random->nextULessThan(SkStrokeRec::kFill_InitStyle + 1)); in TestStrokeInfo()
244 randomize_stroke_rec(&strokeInfo, random); in TestStrokeInfo()
246 dashInfo.fCount = random->nextRangeU(1, 50) * 2; in TestStrokeInfo()
250 dashInfo.fIntervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01), in TestStrokeInfo()
254 dashInfo.fPhase = random->nextRangeScalar(0, sum); in TestStrokeInfo()