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

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

Issue 924973002: Revert of Multi-string shaders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/builders/GrGLSLPrettyPrint.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLShaderBuilder.h
diff --git a/src/gpu/gl/builders/GrGLShaderBuilder.h b/src/gpu/gl/builders/GrGLShaderBuilder.h
index 86db597bff8bc719a8affdf70cbe5670bc978928..8b7b9f9974d9728d9cc52eae068f30163475acd7 100644
--- a/src/gpu/gl/builders/GrGLShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLShaderBuilder.h
@@ -8,7 +8,6 @@
#ifndef GrGLShaderBuilder_DEFINED
#define GrGLShaderBuilder_DEFINED
-#include "SkTArray.h"
#include "gl/GrGLProcessor.h"
#include "gl/GrGLProgramDesc.h"
#include "gl/GrGLProgramDataManager.h"
@@ -74,16 +73,16 @@
void codeAppendf(const char format[], ...) SK_PRINTF_LIKE(2, 3) {
va_list args;
va_start(args, format);
- this->code().appendVAList(format, args);
+ fCode.appendVAList(format, args);
va_end(args);
}
- void codeAppend(const char* str) { this->code().append(str); }
+ void codeAppend(const char* str) { fCode.append(str); }
void codePrependf(const char format[], ...) SK_PRINTF_LIKE(2, 3) {
va_list args;
va_start(args, format);
- this->code().prependVAList(format, args);
+ fCode.prependVAList(format, args);
va_end(args);
}
@@ -139,40 +138,8 @@
*/
void addFeature(uint32_t featureBit, const char* extensionName);
- void nextStage() {
- fShaderStrings.push_back();
- fCompilerStrings.push_back(this->code().c_str());
- fCompilerStringLengths.push_back(this->code().size());
- fCodeIndex++;
- }
+ GrGLProgramBuilder* fProgramBuilder;
- SkString& versionDecl() { return fShaderStrings[kVersionDecl]; }
- SkString& extensions() { return fShaderStrings[kExtensions]; }
- SkString& precisionQualifier() { return fShaderStrings[kPrecisionQualifier]; }
- SkString& uniforms() { return fShaderStrings[kUniforms]; }
- SkString& inputs() { return fShaderStrings[kInputs]; }
- SkString& outputs() { return fShaderStrings[kOutputs]; }
- SkString& functions() { return fShaderStrings[kFunctions]; }
- SkString& main() { return fShaderStrings[kMain]; }
- SkString& code() { return fShaderStrings[fCodeIndex]; }
- bool finalize(GrGLuint programId, GrGLenum type, SkTDArray<GrGLuint>* shaderIds);
-
- enum {
- kVersionDecl,
- kExtensions,
- kPrecisionQualifier,
- kUniforms,
- kInputs,
- kOutputs,
- kFunctions,
- kMain,
- kCode,
- };
-
- GrGLProgramBuilder* fProgramBuilder;
- SkSTArray<kCode, const char*, true> fCompilerStrings;
- SkSTArray<kCode, int, true> fCompilerStringLengths;
- SkSTArray<kCode, SkString> fShaderStrings;
SkString fCode;
SkString fFunctions;
SkString fExtensions;
@@ -180,9 +147,5 @@
VarArray fInputs;
VarArray fOutputs;
uint32_t fFeaturesAddedMask;
- int fCodeIndex;
- bool fFinalized;
-
- friend class GrGLProgramBuilder;
};
#endif
« no previous file with comments | « src/gpu/gl/builders/GrGLSLPrettyPrint.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698