Create GL implementation for GrSingleTextureEffect, use it instead of GrPaint::setTexture()
or GrDrawState::setTexture() in GrContext.cpp
http://codereview.appspot.com/6399053/
git-svn-id: http://skia.googlecode.com/svn/trunk@4677 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 9a6bd1c..c49dac8 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -10,6 +10,11 @@
#include "GrCustomStage.h"
+class GrGLSingleTextureEffect;
+
+/**
+ * An effect that merely blits a single texture; commonly used as a base class.
+ */
class GrSingleTextureEffect : public GrCustomStage {
public:
@@ -19,6 +24,12 @@
virtual unsigned int numTextures() const SK_OVERRIDE;
virtual GrTexture* texture(unsigned int index) const SK_OVERRIDE;
+ static const char* Name() { return "Single Texture"; }
+
+ typedef GrGLSingleTextureEffect GLProgramStage;
+
+ virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
+
private:
GrTexture* fTexture;