/external/skia/samplecode/ |
D | SampleManyRects.cpp | 40 SkRect rect = SkRect::MakeWH(SkIntToScalar(fRandom.nextRangeU(10, 100)), in onDrawContent() 41 SkIntToScalar(fRandom.nextRangeU(10, 100))); in onDrawContent() 42 int x = fRandom.nextRangeU(0, dsize.fWidth); in onDrawContent() 43 int y = fRandom.nextRangeU(0, dsize.fHeight); in onDrawContent() 50 rotate.setRotate(fRandom.nextUScalar1() * 360, in onDrawContent() 61 paint.setColor(fRandom.nextU()); in onDrawContent() 69 SkRandom fRandom; member in ManyRectsView
|
/external/skia/src/gpu/effects/ |
D | GrDistanceFieldGeoProc.cpp | 269 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 279 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], in TestCreate() 280 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], in TestCreate() 282 GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode in TestCreate() 286 flags |= d->fRandom->nextBool() ? kSimilarity_DistanceFieldEffectFlag : 0; in TestCreate() 288 flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0; in TestCreate() 292 GrRandomColor(d->fRandom), in TestCreate() 293 GrTest::TestMatrix(d->fRandom), in TestCreate() 296 d->fRandom->nextF(), in TestCreate() 299 d->fRandom->nextBool()); in TestCreate() [all …]
|
D | GrConstColorProcessor.cpp | 98 int colorPicker = d->fRandom->nextULessThan(3); in TestCreate() 101 uint32_t a = d->fRandom->nextULessThan(0x100); in TestCreate() 102 uint32_t r = d->fRandom->nextULessThan(a+1); in TestCreate() 103 uint32_t g = d->fRandom->nextULessThan(a+1); in TestCreate() 104 uint32_t b = d->fRandom->nextULessThan(a+1); in TestCreate() 112 uint32_t c = d->fRandom->nextULessThan(0x100); in TestCreate() 116 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt)); in TestCreate()
|
D | GrMatrixConvolutionEffect.cpp | 255 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 259 int width = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE); in TestCreate() 260 int height = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE / width); in TestCreate() 264 kernel.get()[i] = d->fRandom->nextSScalar1(); in TestCreate() 266 SkScalar gain = d->fRandom->nextSScalar1(); in TestCreate() 267 SkScalar bias = d->fRandom->nextSScalar1(); in TestCreate() 268 SkIPoint kernelOffset = SkIPoint::Make(d->fRandom->nextRangeU(0, kernelSize.width()), in TestCreate() 269 d->fRandom->nextRangeU(0, kernelSize.height())); in TestCreate() 270 SkIRect bounds = SkIRect::MakeXYWH(d->fRandom->nextRangeU(0, proxy->width()), in TestCreate() 271 d->fRandom->nextRangeU(0, proxy->height()), in TestCreate() [all …]
|
D | GrSimpleTextureEffect.cpp | 96 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 104 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], in TestCreate() 105 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], in TestCreate() 107 GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode in TestCreate() 110 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 111 sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom); in TestCreate()
|
D | GrBitmapTextGeoProc.cpp | 160 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 170 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], in TestCreate() 171 kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], in TestCreate() 173 GrSamplerParams params(tileModes, d->fRandom->nextBool() ? GrSamplerParams::kBilerp_FilterMode in TestCreate() 177 switch (d->fRandom->nextULessThan(3)) { in TestCreate() 189 return GrBitmapTextGeoProc::Make(d->resourceProvider(), GrRandomColor(d->fRandom), in TestCreate() 191 params, format, GrTest::TestMatrix(d->fRandom), in TestCreate() 192 d->fRandom->nextBool()); in TestCreate()
|
D | GrTextureDomain.cpp | 336 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 340 domain.fLeft = d->fRandom->nextRangeScalar(0, proxy->width()); in TestCreate() 341 domain.fRight = d->fRandom->nextRangeScalar(domain.fLeft, proxy->width()); in TestCreate() 342 domain.fTop = d->fRandom->nextRangeScalar(0, proxy->height()); in TestCreate() 343 domain.fBottom = d->fRandom->nextRangeScalar(domain.fTop, proxy->height()); in TestCreate() 345 (GrTextureDomain::Mode) d->fRandom->nextULessThan(GrTextureDomain::kModeCount); in TestCreate() 346 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 347 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false; in TestCreate() 348 sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom); in TestCreate() 451 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() [all …]
|
D | GrGaussianConvolutionFragmentProcessor.cpp | 221 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 225 bool useBounds = d->fRandom->nextBool(); in TestCreate() 229 if (d->fRandom->nextBool()) { in TestCreate() 231 bounds[0] = d->fRandom->nextRangeU(0, proxy->width()-1); in TestCreate() 232 bounds[1] = d->fRandom->nextRangeU(bounds[0], proxy->width()-1); in TestCreate() 235 bounds[0] = d->fRandom->nextRangeU(0, proxy->height()-1); in TestCreate() 236 bounds[1] = d->fRandom->nextRangeU(bounds[0], proxy->height()-1); in TestCreate() 239 int radius = d->fRandom->nextRangeU(1, kMaxKernelRadius); in TestCreate()
|
D | GrConvexPolyEffect.cpp | 60 SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(), in TestCreate() 61 d->fRandom->nextSScalar1(), in TestCreate() 62 d->fRandom->nextSScalar1(), in TestCreate() 63 d->fRandom->nextSScalar1()); in TestCreate() 67 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); in TestCreate() 356 int count = d->fRandom->nextULessThan(kMaxEdges) + 1; in TestCreate() 359 edges[i] = d->fRandom->nextSScalar1(); in TestCreate() 365 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); in TestCreate()
|
D | GrOvalEffect.cpp | 79 center.fX = d->fRandom->nextRangeScalar(0.f, 1000.f); in TestCreate() 80 center.fY = d->fRandom->nextRangeScalar(0.f, 1000.f); in TestCreate() 81 SkScalar radius = d->fRandom->nextRangeF(0.f, 1000.f); in TestCreate() 84 et = (GrPrimitiveEdgeType)d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt); in TestCreate() 244 center.fX = d->fRandom->nextRangeScalar(0.f, 1000.f); in TestCreate() 245 center.fY = d->fRandom->nextRangeScalar(0.f, 1000.f); in TestCreate() 246 SkScalar rx = d->fRandom->nextRangeF(0.f, 1000.f); in TestCreate() 247 SkScalar ry = d->fRandom->nextRangeF(0.f, 1000.f); in TestCreate() 250 et = (GrPrimitiveEdgeType)d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt); in TestCreate()
|
D | GrBezierEffect.cpp | 266 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); in TestCreate() 267 gp = GrConicEffect::Make(GrRandomColor(d->fRandom), GrTest::TestMatrix(d->fRandom), in TestCreate() 268 edgeType, *d->caps(), GrTest::TestMatrix(d->fRandom), in TestCreate() 269 d->fRandom->nextBool()); in TestCreate() 468 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); in TestCreate() 469 gp = GrQuadEffect::Make(GrRandomColor(d->fRandom), GrTest::TestMatrix(d->fRandom), edgeType, in TestCreate() 470 *d->caps(), GrTest::TestMatrix(d->fRandom), in TestCreate() 471 d->fRandom->nextBool()); in TestCreate() 691 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); in TestCreate() 692 gp = GrCubicEffect::Make(GrRandomColor(d->fRandom), GrTest::TestMatrix(d->fRandom), in TestCreate()
|
D | GrRRectEffect.cpp | 110 SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 111 SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 112 SkScalar r = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() 118 (GrPrimitiveEdgeType)d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt); in TestCreate() 441 SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 442 SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 444 r[SkRRect::kUpperLeft_Corner].fX = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() 447 r[SkRRect::kUpperLeft_Corner].fY = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() 451 if (d->fRandom->nextBool()) { in TestCreate() 453 r[SkRRect::kLowerRight_Corner].fX = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() [all …]
|
/external/skia/src/effects/ |
D | GrAlphaThresholdFragmentProcessor.cpp | 155 float innerThresh = d->fRandom->nextUScalar1() * .99f + 0.005f; in TestCreate() 156 float outerThresh = d->fRandom->nextUScalar1() * .99f + 0.005f; in TestCreate() 159 uint32_t width = d->fRandom->nextULessThan(kMaxWidth); in TestCreate() 160 uint32_t height = d->fRandom->nextULessThan(kMaxHeight); in TestCreate() 161 uint32_t x = d->fRandom->nextULessThan(kMaxWidth - width); in TestCreate() 162 uint32_t y = d->fRandom->nextULessThan(kMaxHeight - height); in TestCreate() 164 sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom); in TestCreate()
|
D | SkDisplacementMapEffect.cpp | 533 int texIdxDispl = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : in TestCreate() 535 int texIdxColor = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : in TestCreate() 542 d->fRandom->nextRangeU(1, kMaxComponent)); in TestCreate() 545 d->fRandom->nextRangeU(1, kMaxComponent)); in TestCreate() 546 SkVector scale = SkVector::Make(d->fRandom->nextRangeScalar(0, 100.0f), in TestCreate() 547 d->fRandom->nextRangeScalar(0, 100.0f)); in TestCreate() 549 colorDimensions.fWidth = d->fRandom->nextRangeU(0, colorProxy->width()); in TestCreate() 550 colorDimensions.fHeight = d->fRandom->nextRangeU(0, colorProxy->height()); in TestCreate() 551 auto colorSpaceXform = GrTest::TestColorXform(d->fRandom); in TestCreate()
|
D | SkLightingImageFilter.cpp | 1760 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx in TestCreate() 1763 SkScalar surfaceScale = d->fRandom->nextSScalar1(); in TestCreate() 1764 SkScalar kd = d->fRandom->nextUScalar1(); in TestCreate() 1765 sk_sp<SkImageFilterLight> light(create_random_light(d->fRandom)); in TestCreate() 1768 matrix[i] = d->fRandom->nextUScalar1(); in TestCreate() 1770 SkIRect srcBounds = SkIRect::MakeXYWH(d->fRandom->nextRangeU(0, proxy->width()), in TestCreate() 1771 d->fRandom->nextRangeU(0, proxy->height()), in TestCreate() 1772 d->fRandom->nextRangeU(0, proxy->width()), in TestCreate() 1773 d->fRandom->nextRangeU(0, proxy->height())); in TestCreate() 1774 BoundaryMode mode = static_cast<BoundaryMode>(d->fRandom->nextU() % kBoundaryModeCount); in TestCreate() [all …]
|
D | SkPerlinNoiseShader.cpp | 568 int numOctaves = d->fRandom->nextRangeU(2, 10); in TestCreate() 569 bool stitchTiles = d->fRandom->nextBool(); in TestCreate() 570 SkScalar seed = SkIntToScalar(d->fRandom->nextU()); in TestCreate() 571 SkISize tileSize = SkISize::Make(d->fRandom->nextRangeU(4, 4096), in TestCreate() 572 d->fRandom->nextRangeU(4, 4096)); in TestCreate() 573 SkScalar baseFrequencyX = d->fRandom->nextRangeScalar(0.01f, in TestCreate() 575 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, in TestCreate() 578 sk_sp<SkShader> shader(d->fRandom->nextBool() ? in TestCreate()
|
/external/skia/src/gpu/ |
D | GrDefaultGeoProcFactory.cpp | 242 if (d->fRandom->nextBool()) { in TestCreate() 245 if (d->fRandom->nextBool()) { in TestCreate() 248 if (d->fRandom->nextBool()) { in TestCreate() 251 if (d->fRandom->nextBool()) { in TestCreate() 256 GrRandomColor(d->fRandom), in TestCreate() 257 GrTest::TestMatrix(d->fRandom), in TestCreate() 258 GrTest::TestMatrix(d->fRandom), in TestCreate() 260 d->fRandom->nextBool(), in TestCreate() 261 GrRandomCoverage(d->fRandom)); in TestCreate()
|
/external/skia/src/effects/gradients/ |
D | SkTwoPointConicalGradient_gpu.cpp | 185 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; in TestCreate() 186 SkScalar radius1 = d->fRandom->nextUScalar1(); in TestCreate() 190 center2.set(d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()); in TestCreate() 201 RandomGradientParams params(d->fRandom); in TestCreate() 467 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; in TestCreate() 472 center2.set(d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()); in TestCreate() 479 radius2 = d->fRandom->nextRangeF(0.f, diffLen); in TestCreate() 481 RandomGradientParams params(d->fRandom); in TestCreate() 671 SkPoint center1 = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; in TestCreate() 676 center2.set(d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()); in TestCreate() [all …]
|
D | SkSweepGradient.cpp | 189 SkPoint center = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; in TestCreate() 191 RandomGradientParams params(d->fRandom); in TestCreate()
|
D | SkRadialGradient.cpp | 308 RandomGradientParams params(d->fRandom); in TestCreate() 309 SkPoint center = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; in TestCreate() 310 SkScalar radius = d->fRandom->nextUScalar1(); in TestCreate()
|
/external/skia/bench/ |
D | MatrixBench.cpp | 150 SkScalar rot0 = (fRandom.nextBool()) ? fRandom.nextRangeF(-180, 180) : 0.0f; in onDelayedSetup() 151 SkScalar sx = fRandom.nextRangeF(-3000.f, 3000.f); in onDelayedSetup() 152 SkScalar sy = (fRandom.nextBool()) ? fRandom.nextRangeF(-3000.f, 3000.f) : sx; in onDelayedSetup() 153 SkScalar rot1 = fRandom.nextRangeF(-180, 180); in onDelayedSetup() 167 SkRandom fRandom; member in DecomposeMatrixBench
|
/external/skia/include/gpu/ |
D | GrProcessorUnitTest.h | 53 : fRandom(random) in GrProcessorTestData() 59 SkRandom* fRandom; member 90 uint32_t idx = data->fRandom->nextRangeU(0, GetFactories()->count() - 1); in Make() 125 uint32_t idx = data->fRandom->nextRangeU(0, GetFactories()->count() - 1); in Get()
|
/external/skia/tests/ |
D | GLProgramsTest.cpp | 177 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() 218 if (d->fRandom->nextF() < procTreeProbability) { in set_random_color_coverage_stages() 225 int numProcs = d->fRandom->nextULessThan(maxStages + 1); in set_random_color_coverage_stages() 226 int numColorProcs = d->fRandom->nextULessThan(numProcs + 1); in set_random_color_coverage_stages()
|
/external/skia/gm/ |
D | blurcircles2.cpp | 98 blurRadius += fRandom.nextSScalar1() * kDeltaBlurRadius; in onDraw() 106 radius += fRandom.nextSScalar1() * kDeltaRadius; in onDraw() 159 SkRandom fRandom; member in BlurCircles2GM
|
/external/skia/experimental/SkPerlinNoiseShader2/ |
D | SkPerlinNoiseShader2.cpp | 705 int numOctaves = d->fRandom->nextRangeU(2, 10); in TestCreate() 706 bool stitchTiles = d->fRandom->nextBool(); in TestCreate() 707 SkScalar seed = SkIntToScalar(d->fRandom->nextU()); in TestCreate() 708 SkISize tileSize = SkISize::Make(d->fRandom->nextRangeU(4, 4096), in TestCreate() 709 d->fRandom->nextRangeU(4, 4096)); in TestCreate() 710 SkScalar baseFrequencyX = d->fRandom->nextRangeScalar(0.01f, in TestCreate() 712 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, in TestCreate() 715 sk_sp<SkShader> shader(d->fRandom->nextBool() ? in TestCreate() 1116 SkScalar baseFrequencyX = d->fRandom->nextRangeScalar(0.01f, in TestCreate() 1118 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, in TestCreate() [all …]
|