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

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: 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
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..2048a32bfee8229bf242da5fe733d2b6dcde3310 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -107,13 +107,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 (!fOutOfStage && mangle) {
joshualitt 2015/11/04 21:50:52 Do we still need fOutOfStage?
egdaniel 2015/11/05 21:49:59 removed
if (out->endsWith('_')) {
// Names containing "__" are reserved.
out->append("x");
@@ -122,11 +122,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 +149,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);
« src/gpu/gl/builders/GrGLProgramBuilder.h ('K') | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698