Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Unified Diff: src/gpu/gl/GrGLShaderBuilder.h

Issue 23471008: Add a requiresVertexShader method to GrGLEffect (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: brace formatting issue Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 28f1b3822aeaff279efae2777325bb132ff45d88..42df62ac4583bb62df6870be74719b0ebefa208f 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 hasVertexShaderEffects);
/**
* 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[],
+ void emitEffects(GrGLEffect* const glEffects[],
+ const GrDrawEffect drawEffects[],
const GrBackendEffectFactory::EffectKey effectKeys[],
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;
/**
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698