diff options
author | 2012-10-26 19:16:46 +0000 | |
---|---|---|
committer | 2012-10-26 19:16:46 +0000 | |
commit | 22a800a2578564a8b66bd4d9903ef4186c37f35c (patch) | |
tree | b83aeef35c1766bd3586d7248e1075e5ad7ec49f /src/gpu/effects/GrSingleTextureEffect.cpp | |
parent | 4d3f8b40e3cb0e913c0cac21258df8cdb2a6aeb3 (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.cpp | 18 |
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; }; /////////////////////////////////////////////////////////////////////////////// |