Add morphology, convolution, single texture, texture domain effects to new unit test system
Review URL: http://codereview.appspot.com/6442085/
git-svn-id: http://skia.googlecode.com/svn/trunk@4951 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index 5f66e09..ebd0913 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -56,3 +56,15 @@
const GrProgramStageFactory& GrSingleTextureEffect::getFactory() const {
return GrTProgramStageFactory<GrSingleTextureEffect>::getInstance();
}
+
+///////////////////////////////////////////////////////////////////////////////
+
+GR_DEFINE_CUSTOM_STAGE_TEST(GrSingleTextureEffect);
+
+GrCustomStage* GrSingleTextureEffect::TestCreate(SkRandom* random,
+ GrContext* context,
+ GrTexture* textures[]) {
+ int texIdx = random->nextBool() ? GrCustomStageTestFactory::kSkiaPMTextureIdx :
+ GrCustomStageTestFactory::kAlphaTextureIdx;
+ return SkNEW_ARGS(GrSingleTextureEffect, (textures[texIdx]));
+}