aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSingleTextureEffect.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 19:16:46 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 19:16:46 +0000
commit22a800a2578564a8b66bd4d9903ef4186c37f35c (patch)
treeb83aeef35c1766bd3586d7248e1075e5ad7ec49f /src/gpu/effects/GrSingleTextureEffect.cpp
parent4d3f8b40e3cb0e913c0cac21258df8cdb2a6aeb3 (diff)
Make a bunch of GrGLEffects derive directly from GrGLEffect rather than GrGLLegacyEffect.
Review URL: https://codereview.appspot.com/6783053 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6150 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/effects/GrSingleTextureEffect.cpp')
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index 844bff7693..514e92693d 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -12,18 +12,20 @@
#include "GrBackendEffectFactory.h"
#include "GrTexture.h"
-class GrGLSingleTextureEffect : public GrGLLegacyEffect {
+class GrGLSingleTextureEffect : public GrGLEffect {
public:
GrGLSingleTextureEffect(const GrBackendEffectFactory& factory, const GrEffect&)
: INHERITED (factory) {
}
- virtual void emitVS(GrGLShaderBuilder* builder,
- const char* vertexCoords) SK_OVERRIDE { }
- virtual void emitFS(GrGLShaderBuilder* builder,
- const char* outputColor,
- const char* inputColor,
- const TextureSamplerArray& samplers) SK_OVERRIDE {
+ virtual void emitCode(GrGLShaderBuilder* builder,
+ const GrEffect&,
+ EffectKey,
+ const char* vertexCoords,
+ const char* outputColor,
+ const char* inputColor,
+ const TextureSamplerArray& samplers) SK_OVERRIDE {
+
builder->fFSCode.appendf("\t%s = ", outputColor);
builder->appendTextureLookupAndModulate(&builder->fFSCode, inputColor, samplers[0]);
builder->fFSCode.append(";\n");
@@ -33,7 +35,7 @@ public:
private:
- typedef GrGLLegacyEffect INHERITED;
+ typedef GrGLEffect INHERITED;
};
///////////////////////////////////////////////////////////////////////////////