Home
last modified time | relevance | path

Searched refs:fRandom (Results 1 – 25 of 108) sorted by relevance

12345

/third_party/skia/samplecode/
DSampleManyRects.cpp33 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 100)), in onDrawContent()
34 SkIntToScalar(fRandom.nextRangeU(10, 100))); in onDrawContent()
35 int x = fRandom.nextRangeU(0, dsize.fWidth); in onDrawContent()
36 int y = fRandom.nextRangeU(0, dsize.fHeight); in onDrawContent()
43 rotate.setRotate(fRandom.nextUScalar1() * 360, in onDrawContent()
54 paint.setColor(fRandom.nextU()); in onDrawContent()
61 SkRandom fRandom; member in ManyRectsView
/third_party/flutter/skia/samplecode/
DSampleManyRects.cpp33 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 100)), in onDrawContent()
34 SkIntToScalar(fRandom.nextRangeU(10, 100))); in onDrawContent()
35 int x = fRandom.nextRangeU(0, dsize.fWidth); in onDrawContent()
36 int y = fRandom.nextRangeU(0, dsize.fHeight); in onDrawContent()
43 rotate.setRotate(fRandom.nextUScalar1() * 360, in onDrawContent()
54 paint.setColor(fRandom.nextU()); in onDrawContent()
61 SkRandom fRandom; member in ManyRectsView
/third_party/flutter/skia/src/gpu/effects/
DGrConstColorProcessor.fp66 int colorPicker = d->fRandom->nextULessThan(3);
69 uint32_t a = d->fRandom->nextULessThan(0x100);
70 uint32_t r = d->fRandom->nextULessThan(a+1);
71 uint32_t g = d->fRandom->nextULessThan(a+1);
72 uint32_t b = d->fRandom->nextULessThan(a+1);
80 uint32_t c = d->fRandom->nextULessThan(0x100);
84 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt));
DGrAlphaThresholdFragmentProcessor.fp66 float innerThresh = testData->fRandom->nextUScalar1() * .99f + 0.005f;
67 float outerThresh = testData->fRandom->nextUScalar1() * .99f + 0.005f;
70 uint32_t width = testData->fRandom->nextULessThan(kMaxWidth);
71 uint32_t height = testData->fRandom->nextULessThan(kMaxHeight);
72 uint32_t x = testData->fRandom->nextULessThan(kMaxWidth - width);
73 uint32_t y = testData->fRandom->nextULessThan(kMaxHeight - height);
DGrMatrixConvolutionEffect.cpp320 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
324 int width = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE); in TestCreate()
325 int height = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE / width); in TestCreate()
329 kernel.get()[i] = d->fRandom->nextSScalar1(); in TestCreate()
331 SkScalar gain = d->fRandom->nextSScalar1(); in TestCreate()
332 SkScalar bias = d->fRandom->nextSScalar1(); in TestCreate()
333 SkIPoint kernelOffset = SkIPoint::Make(d->fRandom->nextRangeU(0, kernelSize.width()), in TestCreate()
334 d->fRandom->nextRangeU(0, kernelSize.height())); in TestCreate()
335 SkIRect bounds = SkIRect::MakeXYWH(d->fRandom->nextRangeU(0, proxy->width()), in TestCreate()
336 d->fRandom->nextRangeU(0, proxy->height()), in TestCreate()
[all …]
DGrTextureDomain.cpp358 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
362 domain.fLeft = d->fRandom->nextRangeScalar(0, proxy->width()); in TestCreate()
363 domain.fRight = d->fRandom->nextRangeScalar(domain.fLeft, proxy->width()); in TestCreate()
364 domain.fTop = d->fRandom->nextRangeScalar(0, proxy->height()); in TestCreate()
365 domain.fBottom = d->fRandom->nextRangeScalar(domain.fTop, proxy->height()); in TestCreate()
367 (GrTextureDomain::Mode) d->fRandom->nextULessThan(GrTextureDomain::kModeCount); in TestCreate()
369 (GrTextureDomain::Mode) d->fRandom->nextULessThan(GrTextureDomain::kModeCount); in TestCreate()
370 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
372 d->fRandom->nextBool() : false; in TestCreate()
489 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
[all …]
DGrBitmapTextGeoProc.cpp199 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
209 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
210 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
215 switch (d->fRandom->nextULessThan(3)) { in TestCreate()
228 SkPMColor4f::FromBytes_RGBA(GrRandomColor(d->fRandom)), in TestCreate()
229 d->fRandom->nextBool(), in TestCreate()
231 GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool()); in TestCreate()
DGrDistanceFieldGeoProc.cpp285 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
295 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
296 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
301 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
303 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate()
305 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
307 float lum = d->fRandom->nextF(); in TestCreate()
581 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
591 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
592 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
[all …]
DGrAARectEffect.fp53 SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(),
54 d->fRandom->nextSScalar1(),
55 d->fRandom->nextSScalar1(),
56 d->fRandom->nextSScalar1());
60 d->fRandom->nextULessThan(kGrClipEdgeTypeCnt));
/third_party/skia/src/gpu/effects/
DGrGaussianConvolutionFragmentProcessor.cpp250 Direction dir = d->fRandom->nextBool() ? Direction::kY : Direction::kX; in TestCreate()
252 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate()
253 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate()
254 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate()
255 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate()
260 d->fRandom->nextULessThan(GrSamplerState::kWrapModeCount)); in TestCreate()
261 int radius = d->fRandom->nextRangeU(1, kMaxKernelRadius); in TestCreate()
265 if (d->fRandom->nextBool()) { in TestCreate()
267 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate()
268 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate()
[all …]
DGrBicubicEffect.cpp242 switch (d->fRandom->nextULessThan(3)) { in TestCreate()
253 auto kernel = d->fRandom->nextBool() ? GrBicubicEffect::gMitchell in TestCreate()
255 auto m = GrTest::TestMatrix(d->fRandom); in TestCreate()
256 switch (d->fRandom->nextULessThan(3)) { in TestCreate()
260 GrTest::TestWrapModes(d->fRandom, wm); in TestCreate()
262 if (d->fRandom->nextBool()) { in TestCreate()
264 subset.fLeft = d->fRandom->nextSScalar1() * view.width(); in TestCreate()
265 subset.fTop = d->fRandom->nextSScalar1() * view.height(); in TestCreate()
266 subset.fRight = d->fRandom->nextSScalar1() * view.width(); in TestCreate()
267 subset.fBottom = d->fRandom->nextSScalar1() * view.height(); in TestCreate()
[all …]
DGrMatrixConvolutionEffect.cpp355 int width = d->fRandom->nextRangeU(1, kMaxTestKernelSize); in TestCreate()
356 int height = d->fRandom->nextRangeU(1, kMaxTestKernelSize / width); in TestCreate()
360 kernel.get()[i] = d->fRandom->nextSScalar1(); in TestCreate()
362 SkScalar gain = d->fRandom->nextSScalar1(); in TestCreate()
363 SkScalar bias = d->fRandom->nextSScalar1(); in TestCreate()
365 uint32_t kernalOffsetX = d->fRandom->nextRangeU(0, kernelSize.width()); in TestCreate()
366 uint32_t kernalOffsetY = d->fRandom->nextRangeU(0, kernelSize.height()); in TestCreate()
369 uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); in TestCreate()
370 uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); in TestCreate()
371 uint32_t boundsW = d->fRandom->nextRangeU(0, view.width()); in TestCreate()
[all …]
DGrDistanceFieldGeoProc.cpp290 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
291 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
296 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
298 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate()
300 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
302 float lum = d->fRandom->nextF(); in TestCreate()
557 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
558 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
563 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
565 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate()
[all …]
/third_party/flutter/skia/src/gpu/effects/generated/
DGrConstColorProcessor.cpp82 int colorPicker = d->fRandom->nextULessThan(3); in TestCreate()
85 uint32_t a = d->fRandom->nextULessThan(0x100); in TestCreate()
86 uint32_t r = d->fRandom->nextULessThan(a + 1); in TestCreate()
87 uint32_t g = d->fRandom->nextULessThan(a + 1); in TestCreate()
88 uint32_t b = d->fRandom->nextULessThan(a + 1); in TestCreate()
96 uint32_t c = d->fRandom->nextULessThan(0x100); in TestCreate()
100 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt)); in TestCreate()
DGrAlphaThresholdFragmentProcessor.cpp112 float innerThresh = testData->fRandom->nextUScalar1() * .99f + 0.005f; in TestCreate()
113 float outerThresh = testData->fRandom->nextUScalar1() * .99f + 0.005f; in TestCreate()
116 uint32_t width = testData->fRandom->nextULessThan(kMaxWidth); in TestCreate()
117 uint32_t height = testData->fRandom->nextULessThan(kMaxHeight); in TestCreate()
118 uint32_t x = testData->fRandom->nextULessThan(kMaxWidth - width); in TestCreate()
119 uint32_t y = testData->fRandom->nextULessThan(kMaxHeight - height); in TestCreate()
DGrAARectEffect.cpp105 SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(), in TestCreate()
106 d->fRandom->nextSScalar1(), in TestCreate()
107 d->fRandom->nextSScalar1(), in TestCreate()
108 d->fRandom->nextSScalar1()); in TestCreate()
112 static_cast<GrClipEdgeType>(d->fRandom->nextULessThan(kGrClipEdgeTypeCnt)); in TestCreate()
DGrSimpleTextureEffect.cpp71 int texIdx = testData->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
74 GrTest::TestWrapModes(testData->fRandom, wrapModes); in TestCreate()
82 GrSamplerState params(wrapModes, testData->fRandom->nextBool() in TestCreate()
86 const SkMatrix& matrix = GrTest::TestMatrix(testData->fRandom); in TestCreate()
DGrEllipseEffect.cpp136 center.fX = testData->fRandom->nextRangeScalar(0.f, 1000.f); in TestCreate()
137 center.fY = testData->fRandom->nextRangeScalar(0.f, 1000.f); in TestCreate()
138 SkScalar rx = testData->fRandom->nextRangeF(0.f, 1000.f); in TestCreate()
139 SkScalar ry = testData->fRandom->nextRangeF(0.f, 1000.f); in TestCreate()
142 et = (GrClipEdgeType)testData->fRandom->nextULessThan(kGrClipEdgeTypeCnt); in TestCreate()
/third_party/flutter/skia/src/gpu/
DGrDefaultGeoProcFactory.cpp280 if (d->fRandom->nextBool()) { in TestCreate()
283 if (d->fRandom->nextBool()) { in TestCreate()
286 if (d->fRandom->nextBool()) { in TestCreate()
289 if (d->fRandom->nextBool()) { in TestCreate()
291 if (d->fRandom->nextBool()) { in TestCreate()
295 if (d->fRandom->nextBool()) { in TestCreate()
301 SkPMColor4f::FromBytes_RGBA(GrRandomColor(d->fRandom)), in TestCreate()
302 GrTest::TestColorXform(d->fRandom), in TestCreate()
303 GrTest::TestMatrix(d->fRandom), in TestCreate()
304 GrTest::TestMatrix(d->fRandom), in TestCreate()
[all …]
/third_party/skia/src/gpu/
DGrDefaultGeoProcFactory.cpp250 if (d->fRandom->nextBool()) { in TestCreate()
253 if (d->fRandom->nextBool()) { in TestCreate()
256 if (d->fRandom->nextBool()) { in TestCreate()
258 if (d->fRandom->nextBool()) { in TestCreate()
259 flags |= (d->fRandom->nextBool()) ? kCoverageAttributeTweak_GPFlag in TestCreate()
263 if (d->fRandom->nextBool()) { in TestCreate()
267 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate()
268 SkMatrix viewMtx = GrTest::TestMatrix(d->fRandom); in TestCreate()
269 SkMatrix localMtx = GrTest::TestMatrix(d->fRandom); in TestCreate()
270 bool readsLocalCoords = d->fRandom->nextBool(); in TestCreate()
[all …]
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/flutter/skia/src/gpu/gradients/generated/
DGrLinearGradientLayout.cpp63 {d->fRandom->nextRangeScalar(0.0f, scale), d->fRandom->nextRangeScalar(0.0f, scale)}, in TestCreate()
64 {d->fRandom->nextRangeScalar(0.0f, scale), d->fRandom->nextRangeScalar(0.0f, scale)}}; in TestCreate()
66 GrGradientShader::RandomParams params(d->fRandom); in TestCreate()
DGrTwoPointConicalGradientLayout.cpp156 SkPoint center1 = {d->fRandom->nextRangeScalar(0.0f, scale), in TestCreate()
157 d->fRandom->nextRangeScalar(0.0f, scale)}; in TestCreate()
158 SkPoint center2 = {d->fRandom->nextRangeScalar(0.0f, scale), in TestCreate()
159 d->fRandom->nextRangeScalar(0.0f, scale)}; in TestCreate()
160 SkScalar radius1 = d->fRandom->nextRangeScalar(0.0f, scale); in TestCreate()
161 SkScalar radius2 = d->fRandom->nextRangeScalar(0.0f, scale); in TestCreate()
169 int mask = d->fRandom->nextU(); in TestCreate()
212 GrGradientShader::RandomParams params(d->fRandom); in TestCreate()
/third_party/flutter/skia/modules/particles/src/
DSkParticleEffect.cpp35 , fRandom(nullptr) { in SkParticleExternalValue()
38 void setRandom(SkRandom* random) { fRandom = random; } in setRandom()
42 SkRandom* fRandom; member in SkParticleExternalValue
60 *outReturn = fCurve.eval(*arguments, fRandom[index]); in call()
105 SkColor4f color = fCurve.eval(*arguments, fRandom[index]); in call()
304 *target = fRandom[index].nextF(); in read()
400 , fRandom(random) in SkParticleEffect()
459 SkRandom* randomBase = particles.fRandom.get() + start; in update()
479 fRandom.nextU(); in update()
495 fParticles.fRandom[fCount] = fRandom; in update()
[all …]
/third_party/flutter/skia/src/gpu/gradients/
DGrLinearGradientLayout.fp59 SkPoint points[] = {{d->fRandom->nextRangeScalar(0.0f, scale),
60 d->fRandom->nextRangeScalar(0.0f, scale)},
61 {d->fRandom->nextRangeScalar(0.0f, scale),
62 d->fRandom->nextRangeScalar(0.0f, scale)}};
64 GrGradientShader::RandomParams params(d->fRandom);

12345