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); |
+} |