/external/skia/samplecode/ |
D | SampleClip.cpp | 20 SkRandom rand; in show_text() local 27 paint.setColor((SK_A32_MASK << SK_A32_SHIFT) | rand.nextU()); in show_text() 29 rand.nextSScalar1() * W, rand.nextSScalar1() * H + 20, in show_text() 35 SkRandom rand; in show_fill() local 43 r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, in show_fill() 44 rand.nextUScalar1() * W, rand.nextUScalar1() * H); in show_fill() 45 paint.setColor(rand.nextU()); in show_fill() 48 r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, in show_fill() 49 rand.nextUScalar1() * W, rand.nextUScalar1() * H); in show_fill() 50 paint.setColor(rand.nextU()); in show_fill() [all …]
|
D | SampleHairCurves.cpp | 37 SkRandom rand; in onDrawContent() local 44 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 45 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 46 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 47 rand.nextUScalar1(), rand.nextUScalar1() in onDrawContent() 66 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 67 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 68 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 84 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() 85 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent() [all …]
|
/external/skia/gm/ |
D | beziers.cpp | 17 static void rnd_quad(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_quad() argument 18 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_quad() 20 p->quadTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_quad() 21 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H)); in rnd_quad() 23 paint->setColor(rand.nextU()); in rnd_quad() 24 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_quad() 30 static void rnd_cubic(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_cubic() argument 31 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_cubic() 33 p->cubicTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_cubic() 34 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H), in rnd_cubic() [all …]
|
D | hittestpath.cpp | 46 SkRandom rand; in onDraw() local 50 path.lineTo(rand.nextUScalar1() * scale, rand.nextUScalar1() * scale); in onDraw() 51 path.quadTo(rand.nextUScalar1() * scale, rand.nextUScalar1() * scale, in onDraw() 52 rand.nextUScalar1() * scale, rand.nextUScalar1() * scale); in onDraw() 53 path.cubicTo(rand.nextUScalar1() * scale, rand.nextUScalar1() * scale, in onDraw() 54 rand.nextUScalar1() * scale, rand.nextUScalar1() * scale, in onDraw() 55 rand.nextUScalar1() * scale, rand.nextUScalar1() * scale); in onDraw()
|
D | strokerects.cpp | 37 static void rnd_rect(SkRect* r, SkRandom& rand) { in rnd_rect() argument 38 SkScalar x = rand.nextUScalar1() * W; in rnd_rect() 39 SkScalar y = rand.nextUScalar1() * H; in rnd_rect() 40 SkScalar w = rand.nextUScalar1() * (W >> 2); in rnd_rect() 41 SkScalar h = rand.nextUScalar1() * (H >> 2); in rnd_rect() 42 SkScalar hoffset = rand.nextSScalar1(); in rnd_rect() 43 SkScalar woffset = rand.nextSScalar1(); in rnd_rect() 65 SkRandom rand; in onDraw() local 68 rnd_rect(&r, rand); in onDraw()
|
D | strokes.cpp | 21 static void rnd_rect(SkRect* r, SkPaint* paint, SkRandom& rand) { in rnd_rect() argument 22 SkScalar x = rand.nextUScalar1() * W; in rnd_rect() 23 SkScalar y = rand.nextUScalar1() * H; in rnd_rect() 24 SkScalar w = rand.nextUScalar1() * (W >> 2); in rnd_rect() 25 SkScalar h = rand.nextUScalar1() * (H >> 2); in rnd_rect() 26 SkScalar hoffset = rand.nextSScalar1(); in rnd_rect() 27 SkScalar woffset = rand.nextSScalar1(); in rnd_rect() 32 paint->setColor(rand.nextU()); in rnd_rect() 65 SkRandom rand; in onDraw() local 68 rnd_rect(&r, &paint, rand); in onDraw() [all …]
|
D | beziereffects.cpp | 137 SkRandom rand; in onDraw() local 150 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw() 151 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw() 152 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw() 153 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)} in onDraw() 188 ctrlPtPaint.setColor(rand.nextU() | 0xFF000000); in onDraw() 285 SkRandom rand; in onDraw() local 298 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw() 299 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw() 300 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)} in onDraw() [all …]
|
/external/skia/bench/ |
D | RTreeBench.cpp | 38 SkRandom rand; in onDraw() local 41 rects[i] = fProc(rand, i, NUM_BUILD_RECTS); in onDraw() 71 SkRandom rand; in onPreDraw() local 74 rects[i] = fProc(rand, i, NUM_QUERY_RECTS); in onPreDraw() 80 SkRandom rand; in onDraw() local 84 query.fLeft = rand.nextRangeF(0, GENERATE_EXTENTS); in onDraw() 85 query.fTop = rand.nextRangeF(0, GENERATE_EXTENTS); in onDraw() 86 query.fRight = query.fLeft + 1 + rand.nextRangeF(0, GENERATE_EXTENTS/2); in onDraw() 87 query.fBottom = query.fTop + 1 + rand.nextRangeF(0, GENERATE_EXTENTS/2); in onDraw() 98 static inline SkRect make_XYordered_rects(SkRandom& rand, int index, int numRects) { in make_XYordered_rects() argument [all …]
|
D | HairlinePathBench.cpp | 88 SkRandom rand; in makePath() local 97 int base1 = 2 * rand.nextULessThan(hSize); in makePath() 98 int base2 = 2 * rand.nextULessThan(hSize); in makePath() 99 int base3 = 2 * rand.nextULessThan(hSize); in makePath() 120 SkRandom rand; in makePath() local 129 int base1 = 2 * rand.nextULessThan(hSize); in makePath() 130 int base2 = 2 * rand.nextULessThan(hSize); in makePath() 131 int base3 = 2 * rand.nextULessThan(hSize); in makePath() 152 SkRandom rand; in makePath() local 162 int base1 = 2 * rand.nextULessThan(hSize); in makePath() [all …]
|
/external/v8/test/mjsunit/ |
D | unicodelctest-no-optimization.js | 59 function rand() { function 75 var c = rand(); 78 if (rand() & 1) { 82 if (rand() & 31 == 0) c = 0xfff8 + (rand() & 7) 83 if (rand() & 31 == 0) c = (rand() & 7) 86 if (rand() & 1) c = last + (rand() & 15) - 8; 96 var len = rand() & 0x1f; 98 var last = rand(); 109 if (j < len - 1 && rand() & 1) cc += '-';
|
D | unicodelctest.js | 58 function rand() { function 74 var c = rand(); 77 if (rand() & 1) { 81 if (rand() & 31 == 0) c = 0xfff8 + (rand() & 7) 82 if (rand() & 31 == 0) c = (rand() & 7) 85 if (rand() & 1) c = last + (rand() & 15) - 8; 94 var len = rand() & 0x1f; 96 var last = rand(); 107 if (j < len - 1 && rand() & 1) cc += '-';
|
/external/llvm/lib/Fuzzer/ |
D | FuzzerMutate.cpp | 17 int Bit = rand() % 8; in FlipRandomBit() 29 if (rand() % 2) return rand(); in RandCh() 31 return Special[rand() % (sizeof(Special) - 1)]; in RandCh() 44 switch (rand() % 3) { in Mutate() 47 U->erase(U->begin() + rand() % U->size()); in Mutate() 53 U->insert(U->begin() + rand() % U->size(), RandCh()); in Mutate() 56 size_t Idx = rand() % U->size(); in Mutate() 62 size_t Idx = rand() % U->size(); in Mutate()
|
/external/skia/tests/ |
D | RTreeTest.cpp | 16 static SkRect random_rect(SkRandom& rand) { in random_rect() argument 19 rect.fLeft = rand.nextRangeF(0, 1000); in random_rect() 20 rect.fRight = rand.nextRangeF(0, 1000); in random_rect() 21 rect.fTop = rand.nextRangeF(0, 1000); in random_rect() 22 rect.fBottom = rand.nextRangeF(0, 1000); in random_rect() 46 static void run_queries(skiatest::Reporter* reporter, SkRandom& rand, SkRect rects[], in run_queries() argument 50 SkRect query = random_rect(rand); in run_queries() 73 SkRandom rand; in DEF_TEST() local 80 rects[j] = random_rect(rand); in DEF_TEST() 86 run_queries(reporter, rand, rects, rtree); in DEF_TEST()
|
D | RandomTest.cpp | 63 SkRandom rand; in test_random_byte() local 65 bins[(rand.nextU() >> shift) & 0xff]++; in test_random_byte() 75 SkRandom rand; in test_random_float() local 77 float f = rand.nextF(); in test_random_float() 85 float f = rand.nextF(); in test_random_float() 110 SkRandom rand; in test_single_gorilla() local 116 unsigned int rnd = rand.nextU(); in test_single_gorilla() 123 unsigned int rnd = rand.nextU(); in test_single_gorilla() 163 SkRandom rand; in test_range() local 166 (void) rand.nextRangeU(0, 0xffffffff); in test_range() [all …]
|
D | DrawBitmapRectTest.cpp | 60 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) { in rand_matrix() argument 63 mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix() 66 mat->postScale(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix() 69 mat->postRotate(rand.nextSScalar1() * 360); in rand_matrix() 72 mat->setPerspX(rand.nextSScalar1()); in rand_matrix() 73 mat->setPerspY(rand.nextSScalar1()); in rand_matrix() 77 static void rand_size(SkISize* size, SkRandom& rand) { in rand_size() argument 78 size->set(rand.nextU() & 0xFFFF, rand.nextU() & 0xFFFF); in rand_size() 91 SkRandom rand; in test_treatAsSprite() local 95 rand_matrix(&mat, rand, SkMatrix::kTranslate_Mask); in test_treatAsSprite() [all …]
|
D | RegionTest.cpp | 109 static SkIRect randRect(SkRandom& rand) { in randRect() argument 110 int x = rand.nextU() % W; in randRect() 111 int y = rand.nextU() % H; in randRect() 112 int w = rand.nextU() % W; in randRect() 113 int h = rand.nextU() % H; in randRect() 117 static void randRgn(SkRandom& rand, SkRegion* rgn, int n) { in randRgn() argument 120 rgn->op(randRect(rand), SkRegion::kUnion_Op); in randRgn() 194 SkRandom rand; in test_proc() local 197 randRgn(rand, &outer, 8); in test_proc() 199 randRgn(rand, &inner, 2); in test_proc() [all …]
|
D | MathTest.cpp | 24 SkRandom rand; in test_clz() local 26 uint32_t mask = rand.nextU(); in test_clz() 87 SkRandom rand; in test_muldivround() local 89 unsigned a = rand.nextU() & 0x7FFF; in test_muldivround() 90 unsigned b = rand.nextU() & 0x7FFF; in test_muldivround() 202 static float nextFloat(SkRandom& rand) { in nextFloat() argument 204 data.fSignBitInt = rand.nextU(); in nextFloat() 272 SkRandom rand; in unittest_fastfloat() local 286 rand.setSeed(outer); in unittest_fastfloat() 288 float x = nextFloat(rand); in unittest_fastfloat() [all …]
|
/external/boringssl/src/crypto/rand/ |
D | hwrand.c | 34 uint64_t rand = CRYPTO_rdrand(); in CRYPTO_hwrand() local 35 memcpy(buf, &rand, sizeof(rand)); in CRYPTO_hwrand() 36 len -= sizeof(rand); in CRYPTO_hwrand() 37 buf += sizeof(rand); in CRYPTO_hwrand() 41 uint64_t rand = CRYPTO_rdrand(); in CRYPTO_hwrand() local 42 memcpy(buf, &rand, len); in CRYPTO_hwrand()
|
/external/llvm/test/tools/llvm-cov/Inputs/ |
D | test.cpp | 42 on = rand() % 2; in main() 48 a += rand(); in main() 52 switch (rand() % 5) { in main() 54 a += rand(); in main() 58 a += rand() / rand(); in main() 61 a -= rand(); in main()
|
D | test_no_gcda.cpp.gcov | 47 #####: 42: on = rand() % 2; 53 #####: 48: a += rand(); 57 #####: 52: switch (rand() % 5) { 59 #####: 54: a += rand(); 63 #####: 58: a += rand() / rand(); 66 #####: 61: a -= rand();
|
D | test_no_options.cpp.gcov | 47 2: 42: on = rand() % 2; 53 #####: 48: a += rand(); 57 20: 52: switch (rand() % 5) { 59 4: 54: a += rand(); 63 2: 58: a += rand() / rand(); 66 6: 61: a -= rand();
|
D | test_objdir.cpp.gcov | 47 2: 42: on = rand() % 2; 53 #####: 48: a += rand(); 57 20: 52: switch (rand() % 5) { 59 4: 54: a += rand(); 63 2: 58: a += rand() / rand(); 66 6: 61: a -= rand();
|
D | test_paths.cpp.gcov | 47 3: 42: on = rand() % 2; 53 #####: 48: a += rand(); 57 30: 52: switch (rand() % 5) { 59 6: 54: a += rand(); 63 3: 58: a += rand() / rand(); 66 9: 61: a -= rand();
|
/external/compiler-rt/test/builtins/timing/ |
D | umoddi3.c | 27 input1[i] = (((uint64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63); in main() 28 input2[i] = ((((uint64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63)) + 1LL; in main()
|
D | divdi3.c | 27 input1[i] = (((int64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63); in main() 28 input2[i] = ((((int64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63)) + 1LL; in main()
|