| Index: src/gpu/gl/GrGLEffect.cpp
|
| ===================================================================
|
| --- src/gpu/gl/GrGLEffect.cpp (revision 8241)
|
| +++ src/gpu/gl/GrGLEffect.cpp (working copy)
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "GrGLSL.h"
|
| #include "GrGLEffect.h"
|
| +#include "GrDrawEffect.h"
|
|
|
| GrGLEffect::GrGLEffect(const GrBackendEffectFactory& factory)
|
| : fFactory(factory) {
|
| @@ -17,14 +18,15 @@
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -void GrGLEffect::setData(const GrGLUniformManager&, const GrEffectStage&) {
|
| +void GrGLEffect::setData(const GrGLUniformManager&, const GrDrawEffect&) {
|
| }
|
|
|
| -GrGLEffect::EffectKey GrGLEffect::GenTextureKey(const GrEffectRef* effect,
|
| +GrGLEffect::EffectKey GrGLEffect::GenTextureKey(const GrDrawEffect& drawEffect,
|
| const GrGLCaps& caps) {
|
| EffectKey key = 0;
|
| - for (int index = 0; index < (*effect)->numTextures(); ++index) {
|
| - const GrTextureAccess& access = (*effect)->textureAccess(index);
|
| + int numTextures = (*drawEffect.effect())->numTextures();
|
| + for (int index = 0; index < numTextures; ++index) {
|
| + const GrTextureAccess& access = (*drawEffect.effect())->textureAccess(index);
|
| EffectKey value = GrGLShaderBuilder::KeyForTextureAccess(access, caps) << index;
|
| GrAssert(0 == (value & key)); // keys for each access ought not to overlap
|
| key |= value;
|
| @@ -32,12 +34,12 @@
|
| return key;
|
| }
|
|
|
| -GrGLEffect::EffectKey GrGLEffect::GenAttribKey(const GrEffectStage& stage) {
|
| +GrGLEffect::EffectKey GrGLEffect::GenAttribKey(const GrDrawEffect& drawEffect) {
|
| EffectKey key = 0;
|
|
|
| - int numAttributes = stage.getVertexAttribIndexCount();
|
| + int numAttributes = drawEffect.getVertexAttribIndexCount();
|
| GrAssert(numAttributes <= 2);
|
| - const int* attributeIndices = stage.getVertexAttribIndices();
|
| + const int* attributeIndices = drawEffect.getVertexAttribIndices();
|
| for (int index = 0; index < numAttributes; ++index) {
|
| EffectKey value = attributeIndices[index] << 3*index;
|
| GrAssert(0 == (value & key)); // keys for each attribute ought not to overlap
|
|
|