aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgramStage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl/GrGLProgramStage.h')
-rw-r--r--src/gpu/gl/GrGLProgramStage.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/gpu/gl/GrGLProgramStage.h b/src/gpu/gl/GrGLProgramStage.h
index fce82d2eed..3f8afe4a90 100644
--- a/src/gpu/gl/GrGLProgramStage.h
+++ b/src/gpu/gl/GrGLProgramStage.h
@@ -9,7 +9,7 @@
#define GrGLCustomStage_DEFINED
#include "GrAllocator.h"
-#include "GrCustomStage.h"
+#include "GrEffect.h"
#include "GrGLProgram.h"
#include "GrGLShaderBuilder.h"
#include "GrGLShaderVar.h"
@@ -20,20 +20,20 @@ class GrGLTexture;
/** @file
This file contains specializations for OpenGL of the shader stages declared in
- include/gpu/GrCustomStage.h. Objects of type GrGLProgramStage are responsible for emitting the
- GLSL code that implements a GrCustomStage and for uploading uniforms at draw time. They also
+ include/gpu/GrEffect.h. Objects of type GrGLProgramStage 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 StageKey GenKey(const GrCustomStage&, const GrGLCaps&)
- that is used to implement a program cache. When two GrCustomStages produce the same key this
+ static inline StageKey GenKey(const GrEffect&, const GrGLCaps&)
+ that is used to implement a program cache. When two GrCustomEffects produce the same key this
means that their GrGLProgramStages would emit the same GLSL code.
- These objects are created by the factory object returned by the GrCustomStage::getFactory().
+ These objects are created by the factory object returned by the GrEffect::getFactory().
*/
class GrGLProgramStage {
public:
- typedef GrCustomStage::StageKey StageKey;
+ typedef GrEffect::StageKey StageKey;
enum {
// the number of bits in StageKey available to GenKey
kProgramStageKeyBits = GrProgramStageFactory::kProgramStageKeyBits,
@@ -51,8 +51,7 @@ public:
@param builder Interface used to emit code in the shaders.
@param stage The custom stage that generated this program stage.
- @param key The key that was computed by StageKey() from the generating
- GrCustomStage.
+ @param key The key that was computed by StageKey() 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
coords.
@@ -64,26 +63,26 @@ public:
color is solid white, trans black, known to be opaque, etc.) that allows
the custom stage to communicate back similar known info about its
output.
- @param samplers One entry for each GrTextureAccess of the GrCustomStage that generated
- the GrGLProgramStage. These can be passed to the builder to emit texture
+ @param samplers One entry for each GrTextureAccess of the GrEffect that generated the
+ GrGLProgramStage. These can be passed to the builder to emit texture
reads in the generated code.
*/
virtual void emitCode(GrGLShaderBuilder* builder,
- const GrCustomStage& stage,
+ const GrEffect& stage,
StageKey key,
const char* vertexCoords,
const char* outputColor,
const char* inputColor,
const TextureSamplerArray& samplers) = 0;
- /** A GrGLProgramStage instance can be reused with any GrCustomStage that produces the same
- stage key; this function reads data from a stage and uploads any uniform variables required
+ /** A GrGLProgramStage instance can be reused with any GrEffect that produces the same stage
+ key; this function reads data from a stage and uploads any uniform variables required
by the shaders created in emitCode(). */
- virtual void setData(const GrGLUniformManager&, const GrCustomStage& stage);
+ virtual void setData(const GrGLUniformManager&, const GrEffect& stage);
const char* name() const { return fFactory.name(); }
- static StageKey GenTextureKey(const GrCustomStage&, const GrGLCaps&);
+ static StageKey GenTextureKey(const GrEffect&, const GrGLCaps&);
protected:
@@ -108,7 +107,7 @@ public:
const TextureSamplerArray&) = 0;
virtual void emitCode(GrGLShaderBuilder* builder,
- const GrCustomStage&,
+ const GrEffect&,
StageKey,
const char* vertexCoords,
const char* outputColor,