Chromium Code Reviews| Index: src/gpu/gl/GrGLShaderBuilder.h |
| diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h |
| index 28f1b3822aeaff279efae2777325bb132ff45d88..b152a2ffa0891a542dd9ed446c8d002621faadbc 100644 |
| --- a/src/gpu/gl/GrGLShaderBuilder.h |
| +++ b/src/gpu/gl/GrGLShaderBuilder.h |
| @@ -107,7 +107,7 @@ public: |
| GrGLShaderBuilder(const GrGLContextInfo&, |
| GrGLUniformManager&, |
| const GrGLProgramDesc&, |
| - bool needsVertexShader); |
| + bool requiresVertexShader); |
| /** |
| * Use of these features may require a GLSL extension to be enabled. Shaders may not compile |
| @@ -256,13 +256,13 @@ public: |
| * glEffects array is updated to contain the GrGLEffect generated for each entry in |
| * effectStages. |
| */ |
| - void emitEffects(const GrEffectStage* effectStages[], |
| - const GrBackendEffectFactory::EffectKey effectKeys[], |
| + void emitEffects(GrGLEffect* const glEffects[], |
| + GrDrawEffect const drawEffects[], |
| + GrBackendEffectFactory::EffectKey const effectKeys[], |
|
bsalomon
2013/09/06 14:10:03
what's with the const placement?
Chris Dalton
2013/09/06 17:17:24
For GrDrawEffect and GrBackendEffectFactory, it me
Chris Dalton
2013/09/06 17:31:37
Oh yeah, I forgot. The GrGLEffects can't be const
bsalomon
2013/09/06 17:37:17
Gotcha
|
| int effectCnt, |
| SkString* inOutFSColor, |
| GrSLConstantVec* fsInOutColorKnownValue, |
| - SkTArray<GrGLUniformManager::UniformHandle, true>* effectSamplerHandles[], |
| - GrGLEffect* glEffects[]); |
| + SkTArray<GrGLUniformManager::UniformHandle, true>* effectSamplerHandles[]); |
| GrGLUniformManager::UniformHandle getRTHeightUniform() const { return fRTHeightUniform; } |
| GrGLUniformManager::UniformHandle getDstCopyTopLeftUniform() const { |
| @@ -388,16 +388,16 @@ private: |
| private: |
| class CodeStage : GrNoncopyable { |
| public: |
| - CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffectStage(NULL) {} |
| + CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffect(NULL) {} |
| bool inStageCode() const { |
| this->validate(); |
| - return NULL != fEffectStage; |
| + return NULL != fEffect; |
| } |
| - const GrEffectStage* effectStage() const { |
| + const GrEffectRef* effect() const { |
| this->validate(); |
| - return fEffectStage; |
| + return fEffect; |
| } |
| int stageIndex() const { |
| @@ -407,34 +407,34 @@ private: |
| class AutoStageRestore : GrNoncopyable { |
| public: |
| - AutoStageRestore(CodeStage* codeStage, const GrEffectStage* newStage) { |
| + AutoStageRestore(CodeStage* codeStage, const GrEffectRef* effect) { |
| SkASSERT(NULL != codeStage); |
| fSavedIndex = codeStage->fCurrentIndex; |
| - fSavedEffectStage = codeStage->fEffectStage; |
| + fSavedEffect = codeStage->fEffect; |
| - if (NULL == newStage) { |
| + if (NULL == effect) { |
| codeStage->fCurrentIndex = -1; |
| } else { |
| codeStage->fCurrentIndex = codeStage->fNextIndex++; |
| } |
| - codeStage->fEffectStage = newStage; |
| + codeStage->fEffect = effect; |
| fCodeStage = codeStage; |
| } |
| ~AutoStageRestore() { |
| fCodeStage->fCurrentIndex = fSavedIndex; |
| - fCodeStage->fEffectStage = fSavedEffectStage; |
| + fCodeStage->fEffect = fSavedEffect; |
| } |
| private: |
| - CodeStage* fCodeStage; |
| - int fSavedIndex; |
| - const GrEffectStage* fSavedEffectStage; |
| + CodeStage* fCodeStage; |
| + int fSavedIndex; |
| + const GrEffectRef* fSavedEffect; |
| }; |
| private: |
| - void validate() const { SkASSERT((NULL == fEffectStage) == (-1 == fCurrentIndex)); } |
| - int fNextIndex; |
| - int fCurrentIndex; |
| - const GrEffectStage* fEffectStage; |
| + void validate() const { SkASSERT((NULL == fEffect) == (-1 == fCurrentIndex)); } |
| + int fNextIndex; |
| + int fCurrentIndex; |
| + const GrEffectRef* fEffect; |
| } fCodeStage; |
| /** |