/third_party/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
|
/third_party/skia/src/gpu/effects/ |
D | GrGaussianConvolutionFragmentProcessor.cpp | 250 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 …]
|
D | GrBicubicEffect.cpp | 242 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 …]
|
D | GrMatrixConvolutionEffect.cpp | 355 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 …]
|
D | GrDistanceFieldGeoProc.cpp | 290 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 …]
|
D | GrBitmapTextGeoProc.cpp | 205 GrTest::TestWrapModes(d->fRandom, wrapModes); in TestCreate() 206 GrSamplerState samplerState(wrapModes, d->fRandom->nextBool() in TestCreate() 224 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate() 225 bool wideColor = d->fRandom->nextBool(); in TestCreate() 226 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 227 bool usesW = d->fRandom->nextBool(); in TestCreate()
|
D | GrBezierEffect.cpp | 187 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate() 188 SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 189 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 190 bool usesLocalCoords = d->fRandom->nextBool(); in TestCreate() 340 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate() 341 SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 342 SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 343 bool usesLocalCoords = d->fRandom->nextBool(); in TestCreate()
|
D | GrRRectEffect.cpp | 124 SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 125 SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 126 SkScalar r = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() 133 (GrClipEdgeType)d->fRandom->nextULessThan(kGrClipEdgeTypeCnt); in TestCreate() 458 SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 459 SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f); in TestCreate() 461 r[SkRRect::kUpperLeft_Corner].fX = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() 464 r[SkRRect::kUpperLeft_Corner].fY = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() 468 if (d->fRandom->nextBool()) { in TestCreate() 470 r[SkRRect::kLowerRight_Corner].fX = d->fRandom->nextRangeF(kRadiusMin, 9.f); in TestCreate() [all …]
|
D | GrConvexPolyEffect.cpp | 191 int count = d->fRandom->nextULessThan(kMaxEdges) + 1; in TestCreate() 194 edges[i] = d->fRandom->nextSScalar1(); in TestCreate() 201 static_cast<GrClipEdgeType>(d->fRandom->nextULessThan(kGrClipEdgeTypeCnt)); in TestCreate()
|
D | GrCoverageSetOpXP.cpp | 184 SkRegion::Op regionOp = SkRegion::Op(d->fRandom->nextULessThan(SkRegion::kLastOp + 1)); in TestGet() 185 bool invertCoverage = d->fRandom->nextBool(); in TestGet()
|
D | GrBlendFragmentProcessor.cpp | 179 if (d->fRandom->nextBool()) { in TestCreate() 185 mode = static_cast<SkBlendMode>(d->fRandom->nextRangeU(0, (int)SkBlendMode::kLastMode)); in TestCreate()
|
/third_party/skia/src/gpu/ |
D | GrDefaultGeoProcFactory.cpp | 250 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 …]
|
D | GrProcessorUnitTest.cpp | 29 : 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/ |
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
|
D | AAClipBench.cpp | 90 SkRandom fRandom; member in NestedAAClipBench 135 paint.setColor(0xff000000 | fRandom.nextU()); in recurse()
|
/third_party/skia/gm/ |
D | blurcircles2.cpp | 104 blurRadius += fRandom.nextSScalar1() * kDeltaBlurRadius; in onDraw() 112 radius += fRandom.nextSScalar1() * kDeltaRadius; in onDraw() 165 SkRandom fRandom; member in BlurCircles2GM
|
/third_party/skia/src/effects/imagefilters/ |
D | SkDisplacementMapImageFilter.cpp | 504 static_cast<SkColorChannel>(d->fRandom->nextRangeU(1, kMaxComponent)); in TestCreate() 506 static_cast<SkColorChannel>(d->fRandom->nextRangeU(1, kMaxComponent)); in TestCreate() 508 scale.fX = d->fRandom->nextRangeScalar(0, 100.0f); in TestCreate() 509 scale.fY = d->fRandom->nextRangeScalar(0, 100.0f); in TestCreate() 511 colorDimensions.fWidth = d->fRandom->nextRangeU(0, colorView.width()); in TestCreate() 512 colorDimensions.fHeight = d->fRandom->nextRangeU(0, colorView.height()); in TestCreate()
|
D | SkLightingImageFilter.cpp | 1731 SkScalar surfaceScale = d->fRandom->nextSScalar1(); in TestCreate() 1732 SkScalar kd = d->fRandom->nextUScalar1(); in TestCreate() 1733 sk_sp<SkImageFilterLight> light(create_random_light(d->fRandom)); in TestCreate() 1736 matrix[i] = d->fRandom->nextUScalar1(); in TestCreate() 1739 uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); in TestCreate() 1740 uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); in TestCreate() 1741 uint32_t boundsW = d->fRandom->nextRangeU(0, view.width()); in TestCreate() 1742 uint32_t boundsH = d->fRandom->nextRangeU(0, view.height()); in TestCreate() 1744 BoundaryMode mode = static_cast<BoundaryMode>(d->fRandom->nextU() % kBoundaryModeCount); in TestCreate() 1923 SkScalar surfaceScale = d->fRandom->nextSScalar1(); in TestCreate() [all …]
|
/third_party/skia/tests/ |
D | ProgramsTest.cpp | 172 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/effects/ |
D | SkTableColorFilter.cpp | 206 flags |= d->fRandom->nextBool() ? (1 << i): 0; in TestCreate() 212 luts[j][i] = SkToU8(d->fRandom->nextBits(8)); in TestCreate() 222 sk_sp<SkColorSpace> colorSpace = GrTest::TestColorSpace(d->fRandom); in TestCreate()
|
/third_party/skia/src/shaders/ |
D | SkPerlinNoiseShader.cpp | 676 int numOctaves = d->fRandom->nextRangeU(2, 10); in TestCreate() 677 bool stitchTiles = d->fRandom->nextBool(); in TestCreate() 678 SkScalar seed = SkIntToScalar(d->fRandom->nextU()); in TestCreate() 680 tileSize.fWidth = d->fRandom->nextRangeU(4, 4096); in TestCreate() 681 tileSize.fHeight = d->fRandom->nextRangeU(4, 4096); in TestCreate() 682 SkScalar baseFrequencyX = d->fRandom->nextRangeScalar(0.01f, 0.99f); in TestCreate() 683 SkScalar baseFrequencyY = d->fRandom->nextRangeScalar(0.01f, 0.99f); in TestCreate() 685 sk_sp<SkShader> shader(d->fRandom->nextBool() ? in TestCreate()
|
/third_party/skia/modules/particles/src/ |
D | SkParticleEffect.cpp | 290 fState.fRandom = seed; in start() 425 fState.fRandom = advance_seed(fState.fRandom); in advanceTime() 441 fParticles.fData[SkParticles::kRandom ][fCount] = fState.fRandom; in advanceTime()
|
/third_party/skia/src/gpu/ops/ |
D | DashOp.cpp | 877 AAMode aaMode = static_cast<AAMode>(d->fRandom->nextULessThan(kAAModeCnt)); in TestCreate() 878 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate() 879 SkMatrix matrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 884 d->fRandom->nextBool()); in TestCreate() 1091 AAMode aaMode = static_cast<AAMode>(d->fRandom->nextULessThan(kAAModeCnt)); in TestCreate() 1092 GrColor color = GrTest::RandomColor(d->fRandom); in TestCreate() 1093 SkMatrix matrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 1098 d->fRandom->nextBool()); in TestCreate()
|
D | GrOvalOpFactory.cpp | 257 bool stroke = d->fRandom->nextBool(); in TestCreate() 258 bool roundCaps = stroke ? d->fRandom->nextBool() : false; in TestCreate() 259 bool wideColor = d->fRandom->nextBool(); in TestCreate() 260 bool clipPlane = d->fRandom->nextBool(); in TestCreate() 261 bool isectPlane = d->fRandom->nextBool(); in TestCreate() 262 bool unionPlane = d->fRandom->nextBool(); in TestCreate() 263 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 509 bool wideColor = d->fRandom->nextBool(); in TestCreate() 510 const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom); in TestCreate() 701 bool stroke = d->fRandom->nextBool(); in TestCreate() [all …]
|
/third_party/skia/tools/viewer/ |
D | ParticlesSlide.h | 39 SkRandom fRandom; variable
|