Home
last modified time | relevance | path

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

123456

/external/skqp/samplecode/
DSampleManyRects.cpp39 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 100)), in onDrawContent()
40 SkIntToScalar(fRandom.nextRangeU(10, 100))); in onDrawContent()
41 int x = fRandom.nextRangeU(0, dsize.fWidth); in onDrawContent()
42 int y = fRandom.nextRangeU(0, dsize.fHeight); in onDrawContent()
49 rotate.setRotate(fRandom.nextUScalar1() * 360, in onDrawContent()
60 paint.setColor(fRandom.nextU()); in onDrawContent()
67 SkRandom fRandom; member in ManyRectsView
/external/skia/samplecode/
DSampleManyRects.cpp39 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 100)), in onDrawContent()
40 SkIntToScalar(fRandom.nextRangeU(10, 100))); in onDrawContent()
41 int x = fRandom.nextRangeU(0, dsize.fWidth); in onDrawContent()
42 int y = fRandom.nextRangeU(0, dsize.fHeight); in onDrawContent()
49 rotate.setRotate(fRandom.nextUScalar1() * 360, in onDrawContent()
60 paint.setColor(fRandom.nextU()); in onDrawContent()
67 SkRandom fRandom; member in ManyRectsView
/external/skia/src/gpu/effects/
DGrConstColorProcessor.fp67 int colorPicker = d->fRandom->nextULessThan(3);
70 uint32_t a = d->fRandom->nextULessThan(0x100);
71 uint32_t r = d->fRandom->nextULessThan(a+1);
72 uint32_t g = d->fRandom->nextULessThan(a+1);
73 uint32_t b = d->fRandom->nextULessThan(a+1);
81 uint32_t c = d->fRandom->nextULessThan(0x100);
85 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt));
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()
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 …]
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);
DGrBitmapTextGeoProc.cpp198 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
208 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
209 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
214 switch (d->fRandom->nextULessThan(3)) { in TestCreate()
227 SkPMColor4f::FromBytes_RGBA(GrRandomColor(d->fRandom)), in TestCreate()
228 d->fRandom->nextBool(), in TestCreate()
230 GrTest::TestMatrix(d->fRandom), d->fRandom->nextBool()); in TestCreate()
DGrDistanceFieldGeoProc.cpp284 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
294 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
295 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
300 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
302 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate()
304 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
306 float lum = d->fRandom->nextF(); in TestCreate()
579 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
589 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
590 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
[all …]
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()
/external/skqp/src/gpu/effects/
DGrConstColorProcessor.fp67 int colorPicker = d->fRandom->nextULessThan(3);
70 uint32_t a = d->fRandom->nextULessThan(0x100);
71 uint32_t r = d->fRandom->nextULessThan(a+1);
72 uint32_t g = d->fRandom->nextULessThan(a+1);
73 uint32_t b = d->fRandom->nextULessThan(a+1);
81 uint32_t c = d->fRandom->nextULessThan(0x100);
85 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt));
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()
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 …]
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);
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.cpp284 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
294 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
295 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
300 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate()
302 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate()
304 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate()
306 float lum = d->fRandom->nextF(); in TestCreate()
579 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate()
589 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate()
590 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate()
[all …]
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.cpp104 SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(), in TestCreate()
105 d->fRandom->nextSScalar1(), in TestCreate()
106 d->fRandom->nextSScalar1(), in TestCreate()
107 d->fRandom->nextSScalar1()); in TestCreate()
111 static_cast<GrClipEdgeType>(d->fRandom->nextULessThan(kGrClipEdgeTypeCnt)); in TestCreate()
/external/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 …]
/external/skqp/src/gpu/
DGrDefaultGeoProcFactory.cpp406 if (d->fRandom->nextBool()) { in TestCreate()
409 if (d->fRandom->nextBool()) { in TestCreate()
412 if (d->fRandom->nextBool()) { in TestCreate()
415 if (d->fRandom->nextBool()) { in TestCreate()
417 if (d->fRandom->nextBool()) { in TestCreate()
421 if (d->fRandom->nextBool()) { in TestCreate()
424 if (d->fRandom->nextBool()) { in TestCreate()
430 SkPMColor4f::FromBytes_RGBA(GrRandomColor(d->fRandom)), in TestCreate()
431 GrTest::TestColorXform(d->fRandom), in TestCreate()
432 GrTest::TestMatrix(d->fRandom), in TestCreate()
[all …]
/external/skqp/src/gpu/gradients/
DGrLinearGradientLayout.fp52 SkPoint points[] = {{d->fRandom->nextRangeScalar(0.0f, scale),
53 d->fRandom->nextRangeScalar(0.0f, scale)},
54 {d->fRandom->nextRangeScalar(0.0f, scale),
55 d->fRandom->nextRangeScalar(0.0f, scale)}};
57 GrGradientShader::RandomParams params(d->fRandom);
DGrLinearGradientLayout.cpp61 {d->fRandom->nextRangeScalar(0.0f, scale), d->fRandom->nextRangeScalar(0.0f, scale)}, in TestCreate()
62 {d->fRandom->nextRangeScalar(0.0f, scale), d->fRandom->nextRangeScalar(0.0f, scale)}}; in TestCreate()
64 GrGradientShader::RandomParams params(d->fRandom); in TestCreate()
/external/skia/src/gpu/gradients/
DGrLinearGradientLayout.fp52 SkPoint points[] = {{d->fRandom->nextRangeScalar(0.0f, scale),
53 d->fRandom->nextRangeScalar(0.0f, scale)},
54 {d->fRandom->nextRangeScalar(0.0f, scale),
55 d->fRandom->nextRangeScalar(0.0f, scale)}};
57 GrGradientShader::RandomParams params(d->fRandom);
DGrLinearGradientLayout.cpp61 {d->fRandom->nextRangeScalar(0.0f, scale), d->fRandom->nextRangeScalar(0.0f, scale)}, in TestCreate()
62 {d->fRandom->nextRangeScalar(0.0f, scale), d->fRandom->nextRangeScalar(0.0f, scale)}}; in TestCreate()
64 GrGradientShader::RandomParams params(d->fRandom); in TestCreate()

123456