/third_party/skia/gm/ |
H A D | simplerect.cpp | 40 SkRandom rand; variable 43 paint.setColor(ToolUtils::color_to_565(rand.nextU() | (0xFF << 24))); 44 SkScalar x = rand.nextRangeScalar(min, max); 45 SkScalar y = rand.nextRangeScalar(min, max); 46 SkScalar w = rand.nextRangeScalar(0, size); 47 SkScalar h = rand.nextRangeScalar(0, size);
|
H A D | widebuttcaps.cpp | 25 static void draw_strokes(SkCanvas* canvas, SkRandom* rand, const SkPath& path, in draw_strokes() argument 34 strokePaint.setColor(rand->nextU() | 0xff808080); in draw_strokes() 39 strokePaint.setColor(rand->nextU() | 0xff808080); in draw_strokes() 44 strokePaint.setColor(rand->nextU() | 0xff808080); in draw_strokes() 48 strokePaint.setColor(rand->nextU() | 0xff808080); in draw_strokes() 53 SkRandom rand; in draw_test() local 68 draw_strokes(canvas, &rand, in draw_test() 73 draw_strokes(canvas, &rand, in draw_test() 78 draw_strokes(canvas, &rand, in draw_test() 83 draw_strokes(canvas, &rand, in draw_test() [all...] |
H A D | points.cpp | 36 static void fill_pts(SkPoint pts[], size_t n, SkRandom* rand) { in fill_pts() argument 41 SkScalar y = rand->nextUScalar1() * 480; in fill_pts() 42 SkScalar x = rand->nextUScalar1() * 640; in fill_pts() 50 SkRandom rand; variable 64 fill_pts(pts, n, &rand); 86 SkRandom rand; in DEF_SIMPLE_GM() local 88 p.fX = rand.nextF() * 220 + 18; in DEF_SIMPLE_GM() 89 p.fY = rand.nextF() * 220 + 18; in DEF_SIMPLE_GM()
|
H A D | animatedimageblurs.cpp | 94 void init(SkRandom* rand) { in init() argument 95 fSize = rand->nextRangeF(10.0f, 60.f); in init() 96 fPos.fX = rand->nextRangeF(fSize, kWidth - fSize); in init() 97 fPos.fY = rand->nextRangeF(fSize, kHeight - fSize); in init() 98 fDir.fX = rand->nextRangeF(-1.0f, 1.0f); in init() 100 if (rand->nextBool()) { in init() 103 fBlurOffset = rand->nextRangeF(0.0f, kBlurMax); in init() 105 fSpeed = rand->nextRangeF(20.0f, 60.0f); in init()
|
H A D | ovals.cpp | 137 SkColor genColor(SkRandom* rand) { in genColor() argument 139 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in genColor() 140 hsv[1] = rand->nextRangeF(0.75f, 1.0f); in genColor() 141 hsv[2] = rand->nextRangeF(0.75f, 1.0f); in genColor() 147 SkRandom rand(1); 175 SkColor color = genColor(&rand); 197 SkColor color = genColor(&rand); 214 SkColor color = genColor(&rand); 230 SkColor color = genColor(&rand); 246 SkColor color = genColor(&rand); [all...] |
H A D | imageblur.cpp | 29 SkRandom rand; in imageblurgm_draw() local 33 int x = rand.nextULessThan(WIDTH); in imageblurgm_draw() 34 int y = rand.nextULessThan(HEIGHT); in imageblurgm_draw() 35 textPaint.setColor(ToolUtils::color_to_565(rand.nextBits(24) | 0xFF000000)); in imageblurgm_draw() 36 font.setSize(rand.nextRangeScalar(0, 300)); in imageblurgm_draw()
|
/third_party/mesa3d/src/gallium/drivers/radeonsi/ |
H A D | si_test_image_copy_region.c | 236 enum pipe_format format = (rand() % (PIPE_FORMAT_COUNT - 1)) + 1; in get_random_format() 338 target_index = rand() % (allow_msaa ? 8 : 6); in set_random_image_attrs() 365 templ->nr_samples = 2 << (rand() % 3); in set_random_image_attrs() 369 templ->nr_samples = 2 << (rand() % 3); in set_random_image_attrs() 383 unsigned max_tex_size = rand() & 1 ? 128 : 1024; in set_random_image_attrs() 385 templ->width0 = (rand() % max_tex_size) + 1; in set_random_image_attrs() 389 templ->height0 = (rand() % max_tex_size) + 1; in set_random_image_attrs() 392 templ->depth0 = (rand() % max_tex_size) + 1; in set_random_image_attrs() 396 templ->array_size = (rand() % max_tex_size) + 1; in set_random_image_attrs() 402 switch (rand() in set_random_image_attrs() [all...] |
/third_party/ffmpeg/libavfilter/ |
H A D | vf_shufflepixels.c | 79 int rand = av_lfg_get(c) % nb_blocks; in make_horizontal_map() local 81 if (used[rand] == 0) { in make_horizontal_map() 86 map[rand * s->block_w] = x; in make_horizontal_map() 88 width = FFMIN(s->block_w, s->planewidth[0] - rand * s->block_w); in make_horizontal_map() 89 map[x] = rand * s->block_w; in make_horizontal_map() 91 used[rand] = 1; in make_horizontal_map() 95 map[rand * s->block_w + i] = map[rand * s->block_w] + i; in make_horizontal_map() 117 int rand = av_lfg_get(c) % nb_blocks; in make_vertical_map() local 119 if (used[rand] in make_vertical_map() 156 int rand = av_lfg_get(c) % nb_blocks; make_block_map() local [all...] |
/third_party/skia/docs/examples/ |
H A D | Octopus_Generator_Animated.cpp | 23 SkRandom rand; in REG_FIDDLE_ANIMATED() local 26 float x = rand.nextRangeScalar(0, 256); in REG_FIDDLE_ANIMATED() 27 float y = rand.nextRangeScalar(0, 256); in REG_FIDDLE_ANIMATED() 28 float s = rand.nextRangeScalar(6, 12); in REG_FIDDLE_ANIMATED() 29 SkColor c = rand.nextU() | SkColorSetARGB(255, 0, 0, 0); in REG_FIDDLE_ANIMATED() 30 float radius = rand.nextRangeScalar(0, 40); in REG_FIDDLE_ANIMATED() 31 float angle = (rand.nextRangeScalar(0, 1) + frame) * 6.28319; in REG_FIDDLE_ANIMATED()
|
H A D | Octopus_Generator.cpp | 23 SkRandom rand; in REG_FIDDLE() local 26 paintOctopus(rand.nextRangeScalar(0, 256), rand.nextRangeScalar(0, 256), in REG_FIDDLE() 27 rand.nextRangeScalar(6, 12), rand.nextU() | 0xFF0000000, canvas); in REG_FIDDLE()
|
/third_party/mesa3d/src/util/tests/ |
H A D | fast_urem_by_const_test.cpp | 38 int k = rand() % 64; in rand_uint() 40 return min + (rand() % 16); in rand_uint() 42 return UINT32_MAX - (rand() % 16); in rand_uint() 46 r = 1ull << (rand() % 32); in rand_uint() 54 r |= ((uint32_t)rand() & 0xf) << i * 8; in rand_uint() 55 return r >> (31 - (rand() % 32)); in rand_uint()
|
/third_party/skia/bench/ |
H A D | FSRectBench.cpp | 26 SkRandom rand; variable 31 fRects[i].fLeft = -kMinOffset - rand.nextUScalar1() * kOffsetRange; 32 fRects[i].fTop = -kMinOffset - rand.nextUScalar1() * kOffsetRange; 33 fRects[i].fRight = W + kMinOffset + rand.nextUScalar1() * kOffsetRange; 34 fRects[i].fBottom = H + kMinOffset + rand.nextUScalar1() * kOffsetRange; 35 fColors[i] = rand.nextU() | 0xFF000000;
|
H A D | MathBench.cpp | 37 SkRandom rand; in MathBench() local 39 fSrc[i] = rand.nextSScalar1(); in MathBench() 262 SkRandom rand; in IsFiniteBench() local 265 fData[i] = rand.nextSScalar1(); in IsFiniteBench() 332 SkRandom rand; in FloorBench() local 335 fData[i] = rand.nextSScalar1(); in FloorBench() 353 SkRandom rand; variable 394 SkRandom rand; in CLZBench() local 396 fData[i] = rand.nextU(); in CLZBench() 454 SkRandom rand; in CTZBench() local 514 SkRandom rand; NormalizeBench() local 562 SkRandom rand; FixedMathBench() local 676 SkRandom rand; Floor2IntBench() local [all...] |
H A D | ScalarBench.cpp | 47 SkRandom rand; in init9() local 49 array[i] = rand.nextSScalar1(); in init9() 97 SkRandom rand; in IsFiniteScalarBench() local 99 fArray[i] = rand.nextSScalar1(); in IsFiniteScalarBench() 135 SkRandom rand; in RectBoundsBench() local 137 fPts[i].fX = rand.nextSScalar1(); in RectBoundsBench() 138 fPts[i].fY = rand.nextSScalar1(); in RectBoundsBench()
|
H A D | RegionBench.cpp | 82 SkIRect randrect(SkRandom& rand) { in randrect() argument 83 int x = rand.nextU() % W; in randrect() 84 int y = rand.nextU() % H; in randrect() 85 int w = rand.nextU() % W; in randrect() 86 int h = rand.nextU() % H; in randrect() 94 SkRandom rand; in RegionBench() local 96 fA.op(randrect(rand), SkRegion::kXOR_Op); in RegionBench() 97 fB.op(randrect(rand), SkRegion::kXOR_Op); in RegionBench()
|
/third_party/skia/tests/ |
H A D | AAClipTest.cpp | 125 static SkIRect rand_rect(SkRandom& rand, int n) { in rand_rect() argument 126 int x = rand.nextS() % n; in rand_rect() 127 int y = rand.nextS() % n; in rand_rect() 128 int w = rand.nextU() % n; in rand_rect() 129 int h = rand.nextU() % n; in rand_rect() 133 static void make_rand_rgn(SkRegion* rgn, SkRandom& rand) { in make_rand_rgn() argument 134 int count = rand.nextU() % 20; in make_rand_rgn() 136 rgn->op(rand_rect(rand, 100), SkRegion::kXOR_Op); in make_rand_rgn() 166 SkRandom rand; in test_rgn() local 169 make_rand_rgn(&rgn, rand); in test_rgn() 252 rand_irect(SkIRect* r, int N, SkRandom& rand) rand_irect() argument 261 SkRandom rand; test_irect() local [all...] |
H A D | SortTest.cpp | 20 static void rand_array(SkRandom& rand, int array[], int n) { in rand_array() argument 22 array[j] = rand.nextS() & 0xFF; in rand_array() 44 SkRandom rand; in DEF_TEST() local 47 int count = rand.nextRangeU(1, SK_ARRAY_COUNT(randomArray)); in DEF_TEST() 48 rand_array(rand, randomArray, count); in DEF_TEST()
|
H A D | GrVxTest.cpp | 31 SkRandom rand; in DEF_TEST() local 33 float a=rand.nextRangeF(-1,1), b=rand.nextRangeF(-1,1), c=rand.nextRangeF(-1,1), in DEF_TEST() 34 d=rand.nextRangeF(-1,1); in DEF_TEST()
|
/third_party/skia/samplecode/ |
H A D | SamplePathText.cpp | 81 void init(SkRandom& rand, const SkPath& path); 82 void reset(SkRandom& rand, int w, int h); 124 void PathText::Glyph::init(SkRandom& rand, const SkPath& path) { in init() argument 127 fPaint.setColor(rand.nextU() | 0x80808080); in init() 130 void PathText::Glyph::reset(SkRandom& rand, int w, int h) { in reset() argument 135 fPosition = {rand.nextF() * w, rand.nextF() * h}; in reset() 136 t = pow(rand.nextF(), 100); in reset() 139 fSpin = rand.nextF() * 360; in reset() 157 void reset(SkRandom* rand, in 360 reset(SkRandom& rand, int w, int h) reset() argument [all...] |
/third_party/libdrm/tests/exynos/ |
H A D | exynos_fimg2d_perf.c | 67 x = rand() % buf_width; in fimg2d_perf_simple() 68 y = rand() % buf_height; in fimg2d_perf_simple() 75 w = rand() % (buf_width - x); in fimg2d_perf_simple() 76 h = rand() % (buf_height - y); in fimg2d_perf_simple() 81 img.color = rand(); in fimg2d_perf_simple() 156 x = rand() % buf_width; in fimg2d_perf_multi() 157 y = rand() % buf_height; in fimg2d_perf_multi() 164 w = rand() % (buf_width - x); in fimg2d_perf_multi() 165 h = rand() % (buf_height - y); in fimg2d_perf_multi() 170 images[j].color = rand(); in fimg2d_perf_multi() [all...] |
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/str_format/ |
H A D | extension_test.cc | 61 std::string rand = MakeRandomString(chunk_size); in TEST() local 62 expected += rand; in TEST() 63 sink.Append(rand); in TEST() 75 std::string rand = MakeRandomString(1); in TEST() local 76 expected.append(chunk_size, rand[0]); in TEST() 77 sink.Append(chunk_size, rand[0]); in TEST()
|
/kernel/linux/linux-5.10/tools/testing/radix-tree/ |
H A D | main.c | 58 __gang_check(start, rand() % 113 + 1, rand() % 71, in __big_gang_check() 59 rand() % 157, rand() % 91 + 1); in __big_gang_check() 61 start += rand() % 1000000; in __big_gang_check() 164 start = rand(); in copy_tag_check() 165 end = rand(); in copy_tag_check() 166 if (start > end && (rand() % 10)) { in copy_tag_check() 173 cur = rand(); in copy_tag_check() 203 idx[i] = rand(); in copy_tag_check() [all...] |
/kernel/linux/linux-6.6/tools/testing/radix-tree/ |
H A D | main.c | 58 __gang_check(start, rand() % 113 + 1, rand() % 71, in __big_gang_check() 59 rand() % 157, rand() % 91 + 1); in __big_gang_check() 61 start += rand() % 1000000; in __big_gang_check() 164 start = rand(); in copy_tag_check() 165 end = rand(); in copy_tag_check() 166 if (start > end && (rand() % 10)) { in copy_tag_check() 173 cur = rand(); in copy_tag_check() 203 idx[i] = rand(); in copy_tag_check() [all...] |
/third_party/node/test/parallel/ |
H A D | test-string-decoder-fuzz.js | 11 function rand(max) { function 16 const buf = Buffer.allocUnsafe(rand(maxLen)); 18 buf[i] = rand(256); 27 const enc = encodings[rand(encodings.length)]; 32 const N = rand(10);
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/ptrace/ |
H A D | ptrace-hwbreak.c | 139 if (rand() % 2) in test_workload() 155 if (rand() % 2) in test_workload() 164 gstruct.a[rand() % A_LEN] = 'a'; in test_workload() 167 cvar = gstruct.a[rand() % A_LEN]; in test_workload() 170 if (rand() % 2) in test_workload() 171 gstruct.a[rand() % A_LEN] = 'a'; in test_workload() 173 cvar = gstruct.a[rand() % A_LEN]; in test_workload() 176 gstruct.b[rand() % B_LEN] = 'b'; in test_workload() 179 cvar = gstruct.b[rand() % B_LEN]; in test_workload() 182 if (rand() in test_workload() [all...] |