Home
last modified time | relevance | path

Searched refs:fRandom (Results 1 - 25 of 38) sorted by relevance

12

/third_party/skia/samplecode/
H A DSampleManyRects.cpp33 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 100)),
34 SkIntToScalar(fRandom.nextRangeU(10, 100)));
35 int x = fRandom.nextRangeU(0, dsize.fWidth);
36 int y = fRandom.nextRangeU(0, dsize.fHeight);
43 rotate.setRotate(fRandom.nextUScalar1() * 360,
54 paint.setColor(fRandom.nextU());
61 SkRandom fRandom; member in ManyRectsView
/third_party/skia/src/gpu/effects/
H A DGrGaussianConvolutionFragmentProcessor.cpp257 Direction dir = d->fRandom->nextBool() ? Direction::kY : Direction::kX; in TestCreate()
259 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate()
260 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate()
261 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate()
262 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate()
267 d->fRandom->nextULessThan(GrSamplerState::kWrapModeCount)); in TestCreate()
268 int radius = d->fRandom->nextRangeU(1, kMaxKernelRadius); in TestCreate()
272 if (d->fRandom->nextBool()) { in TestCreate()
274 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate()
275 static_cast<int>(d->fRandom in TestCreate()
[all...]
H A DGrMatrixConvolutionEffect.cpp363 int width = d->fRandom->nextRangeU(1, kMaxTestKernelSize); in TestCreate()
364 int height = d->fRandom->nextRangeU(1, kMaxTestKernelSize / width); in TestCreate()
368 kernel.get()[i] = d->fRandom->nextSScalar1(); in TestCreate()
370 SkScalar gain = d->fRandom->nextSScalar1(); in TestCreate()
371 SkScalar bias = d->fRandom->nextSScalar1(); in TestCreate()
373 uint32_t kernalOffsetX = d->fRandom->nextRangeU(0, kernelSize.width()); in TestCreate()
374 uint32_t kernalOffsetY = d->fRandom->nextRangeU(0, kernelSize.height()); in TestCreate()
377 uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); in TestCreate()
378 uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); in TestCreate()
379 uint32_t boundsW = d->fRandom in TestCreate()
[all...]
H A DGrDistanceFieldGeoProc.cpp298 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
299 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
304 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
306 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate()
308 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
310 float lum = d->fRandom->nextF(); in TestCreate()
573 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
574 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
579 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
581 flags |= d->fRandom in TestCreate()
[all...]
H A DGrBicubicEffect.cpp249 switch (d->fRandom->nextULessThan(3)) { in TestCreate()
260 auto kernel = d->fRandom->nextBool() ? GrBicubicEffect::gMitchell in TestCreate()
262 auto m = GrTest::TestMatrix(d->fRandom); in TestCreate()
263 switch (d->fRandom->nextULessThan(3)) { in TestCreate()
267 GrTest::TestWrapModes(d->fRandom, wm); in TestCreate()
269 if (d->fRandom->nextBool()) { in TestCreate()
271 subset.fLeft = d->fRandom->nextSScalar1() * view.width(); in TestCreate()
272 subset.fTop = d->fRandom->nextSScalar1() * view.height(); in TestCreate()
273 subset.fRight = d->fRandom->nextSScalar1() * view.width(); in TestCreate()
274 subset.fBottom = d->fRandom in TestCreate()
[all...]
H A DGrBitmapTextGeoProc.cpp213 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
214 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
232 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate()
233 bool wideColor = d->fRandom->nextBool(); in TestCreate()
234 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
235 bool usesW = d->fRandom->nextBool(); in TestCreate()
H A DGrBezierEffect.cpp196 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate()
197 SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
198 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
199 bool usesLocalCoords = d->fRandom->nextBool(); in TestCreate()
358 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate()
359 SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
360 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
361 bool usesLocalCoords = d->fRandom->nextBool(); in TestCreate()
H A DGrRRectEffect.cpp126 SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate()
127 SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate()
128 SkScalar r = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate()
135 (GrClipEdgeType)d->fRandom->nextULessThan(kGrClipEdgeTypeCnt); in TestCreate()
468 SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate()
469 SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate()
471 r[SkRRect::kUpperLeft_Corner].fX = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate()
474 r[SkRRect::kUpperLeft_Corner].fY = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate()
478 if (d->fRandom->nextBool()) { in TestCreate()
480 r[SkRRect::kLowerRight_Corner].fX = d->fRandom in TestCreate()
[all...]
H A DGrConvexPolyEffect.cpp198 int count = d->fRandom->nextULessThan(kMaxEdges) + 1; in TestCreate()
201 edges[i] = d->fRandom->nextSScalar1(); in TestCreate()
208 static_cast<GrClipEdgeType>(d->fRandom->nextULessThan(kGrClipEdgeTypeCnt)); in TestCreate()
H A DGrCoverageSetOpXP.cpp193 SkRegion::Op regionOp = SkRegion::Op(d->fRandom->nextULessThan(SkRegion::kLastOp + 1)); in TestGet()
194 bool invertCoverage = d->fRandom->nextBool(); in TestGet()
H A DGrBlendFragmentProcessor.cpp185 if (d->fRandom->nextBool()) { in TestCreate()
191 mode = static_cast<SkBlendMode>(d->fRandom->nextRangeU(0, (int)SkBlendMode::kLastMode)); in TestCreate()
/third_party/skia/src/gpu/
H A DGrDefaultGeoProcFactory.cpp259 if (d->fRandom->nextBool()) {
262 if (d->fRandom->nextBool()) {
265 if (d->fRandom->nextBool()) {
267 if (d->fRandom->nextBool()) {
268 flags |= (d->fRandom->nextBool()) ? kCoverageAttributeTweak_GPFlag
272 if (d->fRandom->nextBool()) {
276 GrColor color = GrTest::RandomColor(d->fRandom);
277 SkMatrix viewMtx = GrTest::TestMatrix(d->fRandom);
278 SkMatrix localMtx = GrTest::TestMatrix(d->fRandom);
279 bool readsLocalCoords = d->fRandom
[all...]
H A DGrProcessorUnitTest.cpp29 : fRandom(random) in GrProcessorTestData()
55 return fViews[fRandom->nextULessThan(fViews.count())]; in randomView()
66 int idx = fRandom->nextULessThan(numAlphaOnly); in randomAlphaOnlyView()
88 uint32_t idx = data->fRandom->nextULessThan(GetFactories()->count()); in Make()
118 uint32_t idx = data->fRandom->nextRangeU(0, GetFactories()->count() - 1); in Get()
205 return data->fRandom->nextBool() ? MakeChildFP(data) : nullptr; in MakeOptionalChildFP()
/third_party/skia/bench/
H A DMatrixBench.cpp150 SkScalar rot0 = (fRandom.nextBool()) ? fRandom.nextRangeF(-180, 180) : 0.0f;
151 SkScalar sx = fRandom.nextRangeF(-3000.f, 3000.f);
152 SkScalar sy = (fRandom.nextBool()) ? fRandom.nextRangeF(-3000.f, 3000.f) : sx;
153 SkScalar rot1 = fRandom.nextRangeF(-180, 180);
167 SkRandom fRandom; member in DecomposeMatrixBench
H A DAAClipBench.cpp90 SkRandom fRandom; member in NestedAAClipBench
135 paint.setColor(0xff000000 | fRandom.nextU()); in recurse()
/third_party/skia/gm/
H A Dblurcircles2.cpp104 blurRadius += fRandom.nextSScalar1() * kDeltaBlurRadius;
112 radius += fRandom.nextSScalar1() * kDeltaRadius;
165 SkRandom fRandom; member in BlurCircles2GM
/third_party/skia/src/effects/imagefilters/
H A DSkDisplacementMapImageFilter.cpp513 static_cast<SkColorChannel>(d->fRandom->nextRangeU(1, kMaxComponent)); in TestCreate()
515 static_cast<SkColorChannel>(d->fRandom->nextRangeU(1, kMaxComponent)); in TestCreate()
517 scale.fX = d->fRandom->nextRangeScalar(0, 100.0f); in TestCreate()
518 scale.fY = d->fRandom->nextRangeScalar(0, 100.0f); in TestCreate()
520 colorDimensions.fWidth = d->fRandom->nextRangeU(0, colorView.width()); in TestCreate()
521 colorDimensions.fHeight = d->fRandom->nextRangeU(0, colorView.height()); in TestCreate()
H A DSkLightingImageFilter.cpp1736 SkScalar surfaceScale = d->fRandom->nextSScalar1(); in TestCreate()
1737 SkScalar kd = d->fRandom->nextUScalar1(); in TestCreate()
1738 sk_sp<SkImageFilterLight> light(create_random_light(d->fRandom)); in TestCreate()
1741 matrix[i] = d->fRandom->nextUScalar1(); in TestCreate()
1744 uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); in TestCreate()
1745 uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); in TestCreate()
1746 uint32_t boundsW = d->fRandom->nextRangeU(0, view.width()); in TestCreate()
1747 uint32_t boundsH = d->fRandom->nextRangeU(0, view.height()); in TestCreate()
1749 BoundaryMode mode = static_cast<BoundaryMode>(d->fRandom->nextU() % kBoundaryModeCount); in TestCreate()
1928 SkScalar surfaceScale = d->fRandom in TestCreate()
[all...]
/third_party/skia/src/effects/
H A DSkTableColorFilter.cpp208 flags |= d->fRandom->nextBool() ? (1 << i): 0; in TestCreate()
214 luts[j][i] = SkToU8(d->fRandom->nextBits(8)); in TestCreate()
224 sk_sp<SkColorSpace> colorSpace = GrTest::TestColorSpace(d->fRandom); in TestCreate()
/third_party/skia/tests/
H A DProgramsTest.cpp172 bool terminate = (1 == maxLevels) || (d->fRandom->nextF() < terminateProbability); in create_random_proc_tree()
198 SkBlendMode mode = static_cast<SkBlendMode>(d->fRandom->nextRangeU(0, in create_random_proc_tree()
201 if (d->fRandom->nextF() < 0.5f) { in create_random_proc_tree()
217 if (d->fRandom->nextF() < procTreeProbability) { in set_random_color_coverage_stages()
/third_party/skia/src/gpu/ops/
H A DDashOp.cpp887 AAMode aaMode = static_cast<AAMode>(d->fRandom->nextULessThan(kAAModeCnt)); in TestCreate()
888 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate()
889 SkMatrix matrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
894 d->fRandom->nextBool()); in TestCreate()
1111 AAMode aaMode = static_cast<AAMode>(d->fRandom->nextULessThan(kAAModeCnt)); in TestCreate()
1112 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate()
1113 SkMatrix matrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
1118 d->fRandom->nextBool()); in TestCreate()
H A DGrOvalOpFactory.cpp265 bool stroke = d->fRandom->nextBool();
266 bool roundCaps = stroke ? d->fRandom->nextBool() : false;
267 bool wideColor = d->fRandom->nextBool();
268 bool clipPlane = d->fRandom->nextBool();
269 bool isectPlane = d->fRandom->nextBool();
270 bool unionPlane = d->fRandom->nextBool();
271 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
524 bool wideColor = d->fRandom->nextBool();
525 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
723 bool stroke = d->fRandom
[all...]
/third_party/skia/src/shaders/
H A DSkPerlinNoiseShader.cpp678 int numOctaves = d->fRandom->nextRangeU(2, 10);
679 bool stitchTiles = d->fRandom->nextBool();
680 SkScalar seed = SkIntToScalar(d->fRandom->nextU());
682 tileSize.fWidth = d->fRandom->nextRangeU(4, 4096);
683 tileSize.fHeight = d->fRandom->nextRangeU(4, 4096);
684 SkScalar baseFrequencyX = d->fRandom->nextRangeScalar(0.01f, 0.99f);
685 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, 0.99f);
687 sk_sp<SkShader> shader(d->fRandom->nextBool() ?
/third_party/skia/tools/viewer/
H A DParticlesSlide.h39 SkRandom fRandom; member in ParticlesSlide
/third_party/skia/modules/particles/src/
H A DSkParticleEffect.cpp290 fState.fRandom = seed; in start()
425 fState.fRandom = advance_seed(fState.fRandom); in advanceTime()
441 fParticles.fData[SkParticles::kRandom ][fCount] = fState.fRandom; in advanceTime()

Completed in 23 milliseconds

12