/external/skia/samplecode/ |
D | SampleManyRects.cpp | 33 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
|
/external/skqp/samplecode/ |
D | SampleManyRects.cpp | 39 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/skqp/src/gpu/effects/ |
D | GrConstColorProcessor.fp | 67 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));
|
D | GrConstColorProcessor.cpp | 82 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()
|
D | GrAlphaThresholdFragmentProcessor.fp | 66 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);
|
D | GrMatrixConvolutionEffect.cpp | 320 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 …]
|
D | GrTextureDomain.cpp | 358 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 …]
|
D | GrBitmapTextGeoProc.cpp | 199 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()
|
D | GrAlphaThresholdFragmentProcessor.cpp | 112 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()
|
D | GrDistanceFieldGeoProc.cpp | 284 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 …]
|
D | GrAARectEffect.fp | 53 SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(), 54 d->fRandom->nextSScalar1(), 55 d->fRandom->nextSScalar1(), 56 d->fRandom->nextSScalar1()); 60 d->fRandom->nextULessThan(kGrClipEdgeTypeCnt));
|
D | GrAARectEffect.cpp | 104 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/effects/ |
D | GrGaussianConvolutionFragmentProcessor.cpp | 265 Direction dir = d->fRandom->nextBool() ? Direction::kY : Direction::kX; 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() 269 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate() 270 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate() 275 d->fRandom->nextULessThan(GrSamplerState::kWrapModeCount)); in TestCreate() 276 int radius = d->fRandom->nextRangeU(1, kMaxKernelRadius); in TestCreate() 280 if (d->fRandom->nextBool()) { in TestCreate() 282 static_cast<int>(d->fRandom->nextRangeU(0, view.width() - 1)), in TestCreate() 283 static_cast<int>(d->fRandom->nextRangeU(0, view.height() - 1)), in TestCreate() [all …]
|
D | GrArithmeticProcessor.fp | 41 k.x = d->fRandom->nextF(); 42 k.y = d->fRandom->nextF(); 43 k.z = d->fRandom->nextF(); 44 k.w = d->fRandom->nextF(); 45 bool enforcePMColor = d->fRandom->nextBool();
|
D | GrBicubicEffect.cpp | 249 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->nextSScalar1() * view.height(); in TestCreate() [all …]
|
D | GrMatrixConvolutionEffect.cpp | 367 int width = d->fRandom->nextRangeU(1, kMaxTestKernelSize); in TestCreate() 368 int height = d->fRandom->nextRangeU(1, kMaxTestKernelSize / width); in TestCreate() 372 kernel.get()[i] = d->fRandom->nextSScalar1(); in TestCreate() 374 SkScalar gain = d->fRandom->nextSScalar1(); in TestCreate() 375 SkScalar bias = d->fRandom->nextSScalar1(); in TestCreate() 377 uint32_t kernalOffsetX = d->fRandom->nextRangeU(0, kernelSize.width()); in TestCreate() 378 uint32_t kernalOffsetY = d->fRandom->nextRangeU(0, kernelSize.height()); in TestCreate() 381 uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); in TestCreate() 382 uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); in TestCreate() 383 uint32_t boundsW = d->fRandom->nextRangeU(0, view.width()); in TestCreate() [all …]
|
D | GrAARectEffect.fp | 55 SkScalar l = d->fRandom->nextSScalar1(); 56 SkScalar t = d->fRandom->nextSScalar1(); 57 SkScalar r = d->fRandom->nextSScalar1(); 58 SkScalar b = d->fRandom->nextSScalar1(); 62 d->fRandom->nextULessThan(kGrClipEdgeTypeCnt));
|
D | GrDistanceFieldGeoProc.cpp | 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() 568 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate() 569 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate() 574 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate() 576 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate() [all …]
|
/external/skqp/src/gpu/ |
D | GrDefaultGeoProcFactory.cpp | 406 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/skia/src/gpu/ |
D | GrDefaultGeoProcFactory.cpp | 262 if (d->fRandom->nextBool()) { in TestCreate() 265 if (d->fRandom->nextBool()) { in TestCreate() 268 if (d->fRandom->nextBool()) { in TestCreate() 270 if (d->fRandom->nextBool()) { in TestCreate() 274 if (d->fRandom->nextBool()) { in TestCreate() 278 GrColor color = GrRandomColor(d->fRandom); in TestCreate() 279 SkMatrix viewMtx = GrTest::TestMatrix(d->fRandom); in TestCreate() 280 SkMatrix localMtx = GrTest::TestMatrix(d->fRandom); in TestCreate() 281 bool readsLocalCoords = d->fRandom->nextBool(); in TestCreate() 282 uint8_t coverage = GrRandomCoverage(d->fRandom); in TestCreate()
|
D | GrProcessorUnitTest.cpp | 28 : fRandom(random) in GrProcessorTestData() 54 return fViews[fRandom->nextULessThan(fViews.count())]; in randomView() 65 int idx = fRandom->nextULessThan(numAlphaOnly); in randomAlphaOnlyView() 87 uint32_t idx = data->fRandom->nextULessThan(GetFactories()->count()); in Make() 117 uint32_t idx = data->fRandom->nextRangeU(0, GetFactories()->count() - 1); in Get() 204 return data->fRandom->nextBool() ? MakeChildFP(data) : nullptr; in MakeOptionalChildFP()
|
/external/skia/src/gpu/gradients/generated/ |
D | GrLinearGradientLayout.cpp | 63 points[0].fX = d->fRandom->nextRangeScalar(0.0f, scale); in TestCreate() 64 points[0].fY = d->fRandom->nextRangeScalar(0.0f, scale); in TestCreate() 65 points[1].fX = d->fRandom->nextRangeScalar(0.0f, scale); in TestCreate() 66 points[1].fY = d->fRandom->nextRangeScalar(0.0f, scale); in TestCreate() 68 GrGradientShader::RandomParams params(d->fRandom); in TestCreate()
|
/external/skqp/src/gpu/gradients/ |
D | GrLinearGradientLayout.cpp | 63 {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()
|
/external/skia/src/gpu/effects/generated/ |
D | GrArithmeticProcessor.cpp | 99 k.x = d->fRandom->nextF(); in TestCreate() 100 k.y = d->fRandom->nextF(); in TestCreate() 101 k.z = d->fRandom->nextF(); in TestCreate() 102 k.w = d->fRandom->nextF(); in TestCreate() 103 bool enforcePMColor = d->fRandom->nextBool(); in TestCreate()
|
D | GrAARectEffect.cpp | 128 SkScalar l = d->fRandom->nextSScalar1(); in TestCreate() 129 SkScalar t = d->fRandom->nextSScalar1(); in TestCreate() 130 SkScalar r = d->fRandom->nextSScalar1(); in TestCreate() 131 SkScalar b = d->fRandom->nextSScalar1(); in TestCreate() 135 static_cast<GrClipEdgeType>(d->fRandom->nextULessThan(kGrClipEdgeTypeCnt)); in TestCreate()
|