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

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

Issue 1288723002: Added mangleString member and onBefore*, onAfter* functions to GrGLFragmentShaderBuilder (Closed) Base URL: https://skia.googlesource.com/skia@cs3_flatten
Patch Set: Added a missing brace Created 5 years, 4 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/GrGLFragmentShaderBuilder.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/GrGLFragmentShaderBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index a7a35e3676f41c4eaf1657864c4238a1a7a8d0a3..20bb3a389341a5bf1f614587d042a8ca3e0d91cf 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -300,3 +300,15 @@ void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrSLPrecision fsPrec)
}
fInputs.push_back().set(v->fType, GrGLShaderVar::kVaryingIn_TypeModifier, v->fFsIn, fsPrec);
}
+
+void GrGLFragmentBuilder::onBeforeChildProcEmitCode() {
+ fSubstageIndices.back()++;
+ fSubstageIndices.push_back(0);
+ fMangleString.append(this->getMangleStringThisLevel());
+}
+
+void GrGLFragmentBuilder::onAfterChildProcEmitCode() {
+ fSubstageIndices.pop_back();
+ int removeAt = fMangleString.findLastOf('_');
+ fMangleString.remove(removeAt, fMangleString.size() - removeAt);
+}
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698