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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1434483002: Add addFragPosUniform to GrGLrogramBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make things private Created 5 years, 1 month 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/GrGLProgramBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index aca8e53f850f2b5c67075219efa87b203e56def7..232c7ba0c2bcf839872baa5d31ad38592060c181 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -56,7 +56,6 @@ GrGLProgramBuilder::GrGLProgramBuilder(GrGLGpu* gpu, const DrawArgs& args)
: fVS(this)
, fGS(this)
, fFS(this, args.fDesc->header().fFragPosKey)
- , fOutOfStage(true)
, fStageIndex(-1)
, fGeometryProcessor(nullptr)
, fXferProcessor(nullptr)
@@ -107,13 +106,13 @@ GrGLProgramBuilder::SeparableVaryingHandle GrGLProgramBuilder::addSeparableVaryi
return SeparableVaryingHandle(varyingInfo.fLocation);
}
-void GrGLProgramBuilder::nameVariable(SkString* out, char prefix, const char* name) {
+void GrGLProgramBuilder::nameVariable(SkString* out, char prefix, const char* name, bool mangle) {
if ('\0' == prefix) {
*out = name;
} else {
out->printf("%c%s", prefix, name);
}
- if (!fOutOfStage) {
+ if (mangle) {
if (out->endsWith('_')) {
// Names containing "__" are reserved.
out->append("x");
@@ -122,11 +121,12 @@ void GrGLProgramBuilder::nameVariable(SkString* out, char prefix, const char* na
}
}
-GrGLSLProgramDataManager::UniformHandle GrGLProgramBuilder::addUniformArray(
+GrGLSLProgramDataManager::UniformHandle GrGLProgramBuilder::internalAddUniformArray(
uint32_t visibility,
GrSLType type,
GrSLPrecision precision,
const char* name,
+ bool mangleName,
int count,
const char** outName) {
SkASSERT(name && strlen(name));
@@ -148,7 +148,7 @@ GrGLSLProgramDataManager::UniformHandle GrGLProgramBuilder::addUniformArray(
if ('u' == name[0]) {
prefix = '\0';
}
- this->nameVariable(uni.fVariable.accessName(), prefix, name);
+ this->nameVariable(uni.fVariable.accessName(), prefix, name, mangleName);
uni.fVariable.setArrayCount(count);
uni.fVisibility = visibility;
uni.fVariable.setPrecision(precision);
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698