Index: src/gpu/effects/GrSimpleTextureEffect.cpp |
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp |
index 370b2ce9a9446d3e0a289586663ac868272312d1..0f6f4032a4953820e2f2c02ef5fc6d44a39274af 100644 |
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp |
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp |
@@ -55,30 +55,27 @@ GrGLFragmentProcessor* GrSimpleTextureEffect::createGLInstance() const { |
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect); |
-GrFragmentProcessor* GrSimpleTextureEffect::TestCreate(SkRandom* random, |
- GrContext*, |
- const GrCaps&, |
- GrTexture* textures[]) { |
- int texIdx = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : |
- GrProcessorUnitTest::kAlphaTextureIdx; |
+GrFragmentProcessor* GrSimpleTextureEffect::TestCreate(GrProcessorTestData* d) { |
+ int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : |
+ GrProcessorUnitTest::kAlphaTextureIdx; |
static const SkShader::TileMode kTileModes[] = { |
SkShader::kClamp_TileMode, |
SkShader::kRepeat_TileMode, |
SkShader::kMirror_TileMode, |
}; |
SkShader::TileMode tileModes[] = { |
- kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
- kTileModes[random->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
+ kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
+ kTileModes[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kTileModes))], |
}; |
- GrTextureParams params(tileModes, random->nextBool() ? GrTextureParams::kBilerp_FilterMode : |
- GrTextureParams::kNone_FilterMode); |
+ GrTextureParams params(tileModes, d->fRandom->nextBool() ? GrTextureParams::kBilerp_FilterMode : |
+ GrTextureParams::kNone_FilterMode); |
static const GrCoordSet kCoordSets[] = { |
kLocal_GrCoordSet, |
kDevice_GrCoordSet |
}; |
- GrCoordSet coordSet = kCoordSets[random->nextULessThan(SK_ARRAY_COUNT(kCoordSets))]; |
+ GrCoordSet coordSet = kCoordSets[d->fRandom->nextULessThan(SK_ARRAY_COUNT(kCoordSets))]; |
- const SkMatrix& matrix = GrTest::TestMatrix(random); |
- return GrSimpleTextureEffect::Create(textures[texIdx], matrix, coordSet); |
+ const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom); |
+ return GrSimpleTextureEffect::Create(d->fTextures[texIdx], matrix, coordSet); |
} |