diff options
Diffstat (limited to 'src/gpu/gl')
-rw-r--r-- | src/gpu/gl/GrGLEffect.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLEffect.h | 8 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgram.cpp | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/gpu/gl/GrGLEffect.cpp b/src/gpu/gl/GrGLEffect.cpp index b53a1cf9bb..0bbf1f7ccb 100644 --- a/src/gpu/gl/GrGLEffect.cpp +++ b/src/gpu/gl/GrGLEffect.cpp @@ -17,11 +17,11 @@ GrGLEffect::~GrGLEffect() { /////////////////////////////////////////////////////////////////////////////// -void GrGLEffect::setData(const GrGLUniformManager&, const GrEffect&) { +void GrGLEffect::setData(const GrGLUniformManager&, const GrEffectStage&) { } GrGLEffect::EffectKey GrGLEffect::GenTextureKey(const GrEffect& effect, - const GrGLCaps& caps) { + const GrGLCaps& caps) { EffectKey key = 0; for (int index = 0; index < effect.numTextures(); ++index) { const GrTextureAccess& access = effect.textureAccess(index); diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h index 132c3d78de..ad097ed8ec 100644 --- a/src/gpu/gl/GrGLEffect.h +++ b/src/gpu/gl/GrGLEffect.h @@ -9,7 +9,7 @@ #define GrGLEffect_DEFINED #include "GrAllocator.h" -#include "GrEffect.h" +#include "GrEffectStage.h" #include "GrGLProgram.h" #include "GrGLShaderBuilder.h" #include "GrGLShaderVar.h" @@ -76,8 +76,10 @@ public: /** A GrGLEffect 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 GrEffect&); + by the shaders created in emitCode(). The GrEffect installed in the GrEffectStage is + guaranteed to be of the same type that created this GrGLEffect and to have an identical + EffectKey as the one that created this GrGLEffect. */ + virtual void setData(const GrGLUniformManager&, const GrEffectStage&); const char* name() const { return fFactory.name(); } diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp index 5634e2aa83..324fdc16e8 100644 --- a/src/gpu/gl/GrGLProgram.cpp +++ b/src/gpu/gl/GrGLProgram.cpp @@ -978,7 +978,7 @@ void GrGLProgram::setData(const GrDrawState& drawState) { if (NULL != fEffects[s]) { const GrEffectStage& stage = drawState.getStage(s); GrAssert(NULL != stage.getEffect()); - fEffects[s]->setData(fUniformManager, *stage.getEffect()); + fEffects[s]->setData(fUniformManager, stage); } } } |