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

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

Issue 1321253003: emitChild() takes an outputColor instead of generating one (Closed) Base URL: https://skia.googlesource.com/skia@cs3_composeshader2
Patch Set: rebase Created 5 years, 3 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 20bb3a389341a5bf1f614587d042a8ca3e0d91cf..a5b3a99ebe1a03d71b93c8f150d2d8cd0c4e09ff 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -302,13 +302,17 @@ void GrGLFragmentShaderBuilder::addVarying(GrGLVarying* v, GrSLPrecision fsPrec)
}
void GrGLFragmentBuilder::onBeforeChildProcEmitCode() {
- fSubstageIndices.back()++;
+ SkASSERT(fSubstageIndices.count() >= 1);
fSubstageIndices.push_back(0);
- fMangleString.append(this->getMangleStringThisLevel());
+ // second-to-last value in the fSubstageIndices stack is the index of the child proc
+ // at that level which is currently emitting code.
+ fMangleString.appendf("_c%d", fSubstageIndices[fSubstageIndices.count() - 2]);
}
void GrGLFragmentBuilder::onAfterChildProcEmitCode() {
+ SkASSERT(fSubstageIndices.count() >= 2);
fSubstageIndices.pop_back();
+ fSubstageIndices.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