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

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

Issue 23464082: Revert "Add a requiresVertexShader method to GrGLEffect" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 5f2983d19dbbfd36eb857f09ca09fdea3dfdbc04..3c3275ce369246e7c5f701597adc90bb267ab777 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -108,7 +108,7 @@ public:
GrGLShaderBuilder(const GrGLContextInfo&,
GrGLUniformManager&,
const GrGLProgramDesc&,
- bool hasVertexShaderEffects);
+ bool needsVertexShader);
/**
* Use of these features may require a GLSL extension to be enabled. Shaders may not compile
@@ -257,13 +257,13 @@ public:
* glEffects array is updated to contain the GrGLEffect generated for each entry in
* effectStages.
*/
- void emitEffects(GrGLEffect* const glEffects[],
- const GrDrawEffect drawEffects[],
+ void emitEffects(const GrEffectStage* effectStages[],
const GrBackendEffectFactory::EffectKey effectKeys[],
int effectCnt,
SkString* inOutFSColor,
GrSLConstantVec* fsInOutColorKnownValue,
- SkTArray<GrGLUniformManager::UniformHandle, true>* effectSamplerHandles[]);
+ SkTArray<GrGLUniformManager::UniformHandle, true>* effectSamplerHandles[],
+ GrGLEffect* glEffects[]);
GrGLUniformManager::UniformHandle getRTHeightUniform() const { return fRTHeightUniform; }
GrGLUniformManager::UniformHandle getDstCopyTopLeftUniform() const {
@@ -389,16 +389,16 @@ private:
private:
class CodeStage : public SkNoncopyable {
public:
- CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffect(NULL) {}
+ CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffectStage(NULL) {}
bool inStageCode() const {
this->validate();
- return NULL != fEffect;
+ return NULL != fEffectStage;
}
- const GrEffectRef* effect() const {
+ const GrEffectStage* effectStage() const {
this->validate();
- return fEffect;
+ return fEffectStage;
}
int stageIndex() const {
@@ -408,34 +408,34 @@ private:
class AutoStageRestore : public SkNoncopyable {
public:
- AutoStageRestore(CodeStage* codeStage, const GrEffectRef* effect) {
+ AutoStageRestore(CodeStage* codeStage, const GrEffectStage* newStage) {
SkASSERT(NULL != codeStage);
fSavedIndex = codeStage->fCurrentIndex;
- fSavedEffect = codeStage->fEffect;
+ fSavedEffectStage = codeStage->fEffectStage;
- if (NULL == effect) {
+ if (NULL == newStage) {
codeStage->fCurrentIndex = -1;
} else {
codeStage->fCurrentIndex = codeStage->fNextIndex++;
}
- codeStage->fEffect = effect;
+ codeStage->fEffectStage = newStage;
fCodeStage = codeStage;
}
~AutoStageRestore() {
fCodeStage->fCurrentIndex = fSavedIndex;
- fCodeStage->fEffect = fSavedEffect;
+ fCodeStage->fEffectStage = fSavedEffectStage;
}
private:
- CodeStage* fCodeStage;
- int fSavedIndex;
- const GrEffectRef* fSavedEffect;
+ CodeStage* fCodeStage;
+ int fSavedIndex;
+ const GrEffectStage* fSavedEffectStage;
};
private:
- void validate() const { SkASSERT((NULL == fEffect) == (-1 == fCurrentIndex)); }
- int fNextIndex;
- int fCurrentIndex;
- const GrEffectRef* fEffect;
+ void validate() const { SkASSERT((NULL == fEffectStage) == (-1 == fCurrentIndex)); }
+ int fNextIndex;
+ int fCurrentIndex;
+ const GrEffectStage* fEffectStage;
} 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