Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1213623022: fix up test create functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode_gpu.cpp
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp
index 302e8b6405b3bcd26164667788dc3eca570a9120..007ff26b425933825ccc57f87535bc921bfb3d22 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);
}
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698