aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLEffect.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-29 19:51:22 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-29 19:51:22 +0000
commit2eaaefd7e6a58339b3f93333f1e9cc92252cc303 (patch)
treef65a31a9b3bc70909ceb311ebad684c2bf445868 /src/gpu/gl/GrGLEffect.h
parent484ee2a5fe47c204d9dda6acba54f9789d1cf69f (diff)
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
Diffstat (limited to 'src/gpu/gl/GrGLEffect.h')
-rw-r--r--src/gpu/gl/GrGLEffect.h14
1 files changed, 7 insertions, 7 deletions
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,