From 2eaaefd7e6a58339b3f93333f1e9cc92252cc303 Mon Sep 17 00:00:00 2001 From: "bsalomon@google.com" Date: Mon, 29 Oct 2012 19:51:22 +0000 Subject: Pass GrCustomStage to key-generation functions and emitCode(). R=robertphillips@google.com Review URL: https://codereview.appspot.com/6819046 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6182 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGLEffect.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gpu/gl/GrGLEffect.h') diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h index 74d3f0f1a3..30b8455a68 100644 --- a/src/gpu/gl/GrGLEffect.h +++ b/src/gpu/gl/GrGLEffect.h @@ -8,14 +8,13 @@ #ifndef GrGLEffect_DEFINED #define GrGLEffect_DEFINED -#include "GrAllocator.h" -#include "GrEffectStage.h" +#include "GrBackendEffectFactory.h" #include "GrGLProgram.h" #include "GrGLShaderBuilder.h" #include "GrGLShaderVar.h" #include "GrGLSL.h" -struct GrGLInterface; +class GrEffectStage; class GrGLTexture; /** @file @@ -23,7 +22,7 @@ class GrGLTexture; include/gpu/GrEffect.h. Objects of type GrGLEffect are responsible for emitting the GLSL code that implements a GrEffect and for uploading uniforms at draw time. They also must have a function: - static inline EffectKey GenKey(const GrEffect&, const GrGLCaps&) + static inline EffectKey GenKey(const GrEffectStage&, const GrGLCaps&) that is used to implement a program cache. When two GrEffects produce the same key this means that their GrGLEffects would emit the same GLSL code. @@ -33,7 +32,8 @@ class GrGLTexture; class GrGLEffect { public: - typedef GrEffect::EffectKey EffectKey; + typedef GrBackendEffectFactory::EffectKey EffectKey; + enum { // the number of bits in EffectKey available to GenKey kEffectKeyBits = GrBackendEffectFactory::kEffectKeyBits, @@ -50,7 +50,7 @@ public: stages. @param builder Interface used to emit code in the shaders. - @param effect The effect that generated this program stage. + @param stage The effect stage that generated this program stage. @param key The key that was computed by EffectKey() from the generating GrEffect. @param vertexCoords A vec2 of texture coordinates in the VS, which may be altered. This will be removed soon and stages will be responsible for computing their own @@ -67,7 +67,7 @@ public: reads in the generated code. */ virtual void emitCode(GrGLShaderBuilder* builder, - const GrEffect& effect, + const GrEffectStage& stage, EffectKey key, const char* vertexCoords, const char* outputColor, -- cgit v1.2.3