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

Unified Diff: src/effects/SkAlphaThresholdFilter.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 | « include/gpu/GrProcessorUnitTest.h ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 006b9e60521630da1ff377670a273ec9c472a32b..36c046b88dce76926651ea1f1846d86ec0d71283 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -207,17 +207,13 @@ void GrGLAlphaThresholdEffect::setData(const GrGLProgramDataManager& pdman,
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AlphaThresholdEffect);
-GrFragmentProcessor* AlphaThresholdEffect::TestCreate(SkRandom* random,
- GrContext* context,
- const GrCaps&,
- GrTexture** textures) {
- GrTexture* bmpTex = textures[GrProcessorUnitTest::kSkiaPMTextureIdx];
- GrTexture* maskTex = textures[GrProcessorUnitTest::kAlphaTextureIdx];
- float inner_thresh = random->nextUScalar1();
- float outer_thresh = random->nextUScalar1();
- GrShaderDataManager shaderDataManager;
- return AlphaThresholdEffect::Create(&shaderDataManager, bmpTex, maskTex, inner_thresh,
- outer_thresh);
+GrFragmentProcessor* AlphaThresholdEffect::TestCreate(GrProcessorTestData* d) {
+ GrTexture* bmpTex = d->fTextures[GrProcessorUnitTest::kSkiaPMTextureIdx];
+ GrTexture* maskTex = d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx];
+ float innerThresh = d->fRandom->nextUScalar1();
+ float outerThresh = d->fRandom->nextUScalar1();
+ return AlphaThresholdEffect::Create(d->fShaderDataManager, bmpTex, maskTex, innerThresh,
+ outerThresh);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « include/gpu/GrProcessorUnitTest.h ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698