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

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: comment updated 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
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 006b9e60521630da1ff377670a273ec9c472a32b..a206d339bda4bb38c63eb4ac58a988ebe144cfa6 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -207,16 +207,12 @@ void GrGLAlphaThresholdEffect::setData(const GrGLProgramDataManager& pdman,
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AlphaThresholdEffect);
robertphillips 2015/07/08 20:51:32 add space between '*' & 'd' ?
-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,
+GrFragmentProcessor* AlphaThresholdEffect::TestCreate(GrProcessorTestData*d) {
+ GrTexture* bmpTex = d->fTextures[GrProcessorUnitTest::kSkiaPMTextureIdx];
+ GrTexture* maskTex = d->fTextures[GrProcessorUnitTest::kAlphaTextureIdx];
robertphillips 2015/07/08 20:51:32 innerThresh & outerThresh ?
+ float inner_thresh = d->fRandom->nextUScalar1();
+ float outer_thresh = d->fRandom->nextUScalar1();
+ return AlphaThresholdEffect::Create(d->fShaderDataManager, bmpTex, maskTex, inner_thresh,
outer_thresh);
}

Powered by Google App Engine
This is Rietveld 408576698