Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index 2fbe435d14322e2c7027c9711507e5249b219ff4..8e2edcf0ab564605a3ce376a8dd34a0bd914e6e6 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -527,28 +527,24 @@ private: |
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrLinearGradient); |
-GrFragmentProcessor* GrLinearGradient::TestCreate(SkRandom* random, |
- GrContext* context, |
- const GrCaps&, |
- GrTexture**) { |
- SkPoint points[] = {{random->nextUScalar1(), random->nextUScalar1()}, |
- {random->nextUScalar1(), random->nextUScalar1()}}; |
+GrFragmentProcessor* GrLinearGradient::TestCreate(GrProcessorTestData* d) { |
+ SkPoint points[] = {{d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}, |
+ {d->fRandom->nextUScalar1(), d->fRandom->nextUScalar1()}}; |
SkColor colors[kMaxRandomGradientColors]; |
SkScalar stopsArray[kMaxRandomGradientColors]; |
SkScalar* stops = stopsArray; |
SkShader::TileMode tm; |
- int colorCount = RandomGradientParams(random, colors, &stops, &tm); |
+ int colorCount = RandomGradientParams(d->fRandom, colors, &stops, &tm); |
SkAutoTUnref<SkShader> shader(SkGradientShader::CreateLinear(points, |
colors, stops, colorCount, |
tm)); |
SkPaint paint; |
GrColor paintColor; |
GrFragmentProcessor* fp; |
- GrPaint grPaint; |
- SkAssertResult(shader->asFragmentProcessor(context, paint, |
- GrTest::TestMatrix(random), NULL, |
- &paintColor, grPaint.getShaderDataManager(), &fp)); |
+ SkAssertResult(shader->asFragmentProcessor(d->fContext, paint, |
+ GrTest::TestMatrix(d->fRandom), NULL, |
+ &paintColor, d->fShaderDataManager, &fp)); |
return fp; |
} |