diff options
Diffstat (limited to 'src/effects/gradients/SkRadialGradient.cpp')
-rw-r--r-- | src/effects/gradients/SkRadialGradient.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index 18ef376862..f13deb1cdb 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp @@ -308,12 +308,9 @@ sk_sp<GrFragmentProcessor> GrRadialGradient::TestCreate(GrProcessorTestData* d) SkPoint center = {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}; SkScalar radius = d->fRandom->nextUScalar1(); - SkColor colors[kMaxRandomGradientColors]; - SkScalar stopsArray[kMaxRandomGradientColors]; - SkScalar* stops = stopsArray; - SkShader::TileMode tm; - int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm); - auto shader = SkGradientShader::MakeRadial(center, radius, colors, stops, colorCount, tm); + RandomGradientParams params(d->fRandom); + auto shader = SkGradientShader::MakeRadial(center, radius, params.fColors, params.fStops, + params.fColorCount, params.fTileMode); SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom); auto dstColorSpace = GrTest::TestColorSpace(d->fRandom); sk_sp<GrFragmentProcessor> fp = shader->asFragmentProcessor(SkShader::AsFPArgs( |