Home | History | Annotate | Download | only in tools

Lines Matching refs:rand

32 static void add_white(SkRandom* rand, SkString* atom) {
37 int reps = rand->nextRangeU(0, 2);
39 int index = rand->nextRangeU(0, (int) SK_ARRAY_COUNT(gWhiteSpace) - 1);
46 static void add_comma(SkRandom* rand, SkString* atom) {
52 add_white(rand, atom);
53 if (rand->nextBool()) {
57 add_white(rand, atom);
61 static void add_some_white(SkRandom* rand, SkString* atom) {
64 add_white(rand, atom);
68 SkString MakeRandomParsePathPiece(SkRandom* rand) {
70 int index = rand->nextRangeU(0, (int) SK_ARRAY_COUNT(gLegal) - 1);
72 gEasy ? atom.append("\n") : add_white(rand, &atom);
73 char symbol = legal.fSymbol | (rand->nextBool() ? 0x20 : 0);
75 int reps = rand->nextRangeU(1, 3);
78 SkScalar coord = rand->nextRangeF(0, 100);
79 add_white(rand, &atom);
82 add_comma(rand, &atom);
84 add_some_white(rand, &atom);
87 atom.appendScalar(rand->nextRangeF(-720, 720));
88 add_comma(rand, &atom);
89 atom.appendU32(rand->nextRangeU(0, 1));
90 add_comma(rand, &atom);
91 atom.appendU32(rand->nextRangeU(0, 1));
92 add_comma(rand, &atom);