aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkArithmeticMode_gpu.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-08 14:26:19 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-08 14:26:19 -0700
commit0067ff5e0f85084dd2b5ad9886b526482b89a116 (patch)
tree6c213906df65de39425352f329876e6336a301ac /src/effects/SkArithmeticMode_gpu.cpp
parent8e0da72ba890de395c9946ec6639c9e1e7b16027 (diff)
fix up test create functions
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1213623022
Diffstat (limited to 'src/effects/SkArithmeticMode_gpu.cpp')
-rw-r--r--src/effects/SkArithmeticMode_gpu.cpp37
1 files changed, 15 insertions, 22 deletions
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp
index 302e8b6405..007ff26b42 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -139,19 +139,15 @@ void GrArithmeticFP::onComputeInvariantOutput(GrInvariantOutput* inout) const {
///////////////////////////////////////////////////////////////////////////////
-GrFragmentProcessor* GrArithmeticFP::TestCreate(SkRandom* rand,
- GrContext*,
- const GrCaps&,
- GrTexture* textures[]) {
- float k1 = rand->nextF();
- float k2 = rand->nextF();
- float k3 = rand->nextF();
- float k4 = rand->nextF();
- bool enforcePMColor = rand->nextBool();
-
- GrShaderDataManager shaderDataManager;
- return SkNEW_ARGS(GrArithmeticFP, (&shaderDataManager, k1, k2, k3, k4, enforcePMColor,
- textures[0]));
+GrFragmentProcessor* GrArithmeticFP::TestCreate(GrProcessorTestData* d) {
+ float k1 = d->fRandom->nextF();
+ float k2 = d->fRandom->nextF();
+ float k3 = d->fRandom->nextF();
+ float k4 = d->fRandom->nextF();
+ bool enforcePMColor = d->fRandom->nextBool();
+
+ return SkNEW_ARGS(GrArithmeticFP, (d->fShaderDataManager, k1, k2, k3, k4, enforcePMColor,
+ d->fTextures[0]));
}
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticFP);
@@ -305,15 +301,12 @@ void GrArithmeticXPFactory::getInvariantBlendedColor(const GrProcOptInfo& colorP
GR_DEFINE_XP_FACTORY_TEST(GrArithmeticXPFactory);
-GrXPFactory* GrArithmeticXPFactory::TestCreate(SkRandom* random,
- GrContext*,
- const GrCaps&,
- GrTexture*[]) {
- float k1 = random->nextF();
- float k2 = random->nextF();
- float k3 = random->nextF();
- float k4 = random->nextF();
- bool enforcePMColor = random->nextBool();
+GrXPFactory* GrArithmeticXPFactory::TestCreate(GrProcessorTestData* d) {
+ float k1 = d->fRandom->nextF();
+ float k2 = d->fRandom->nextF();
+ float k3 = d->fRandom->nextF();
+ float k4 = d->fRandom->nextF();
+ bool enforcePMColor = d->fRandom->nextBool();
return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
}