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

Unified Diff: src/gpu/gl/GrGLFragmentProcessor.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/GrGLFragmentProcessor.h ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLFragmentProcessor.cpp
diff --git a/src/gpu/gl/GrGLFragmentProcessor.cpp b/src/gpu/gl/GrGLFragmentProcessor.cpp
index 078491a5bff21d2ea36c76e1521c9399f2e489ab..6d91c72fcf683a24d756407251a465cb0853edaf 100644
--- a/src/gpu/gl/GrGLFragmentProcessor.cpp
+++ b/src/gpu/gl/GrGLFragmentProcessor.cpp
@@ -20,16 +20,12 @@ void GrGLFragmentProcessor::setData(const GrGLProgramDataManager& pdman,
}
void GrGLFragmentProcessor::emitChild(int childIndex, const char* inputColor,
- SkString* outputColor, EmitArgs& args) {
+ const char* outputColor, EmitArgs& args) {
GrGLFragmentBuilder* fb = args.fBuilder->getFragmentShaderBuilder();
fb->onBeforeChildProcEmitCode(); // call first so mangleString is updated
const GrFragmentProcessor& childProc = args.fFp.childProcessor(childIndex);
- // Mangle the name of the outputColor
- outputColor->set(args.fOutputColor);
- outputColor->append(fb->getMangleStringThisLevel());
-
/*
* We now want to find the subset of coords and samplers that belong to the child and its
* descendants and put that into childCoords and childSamplers. To do so, we'll do a forwards
@@ -78,13 +74,12 @@ void GrGLFragmentProcessor::emitChild(int childIndex, const char* inputColor,
}
// emit the code for the child in its own scope
- fb->codeAppendf("vec4 %s;\n", outputColor->c_str());
fb->codeAppend("{\n");
fb->codeAppendf("// Child Index %d (mangle: %s): %s\n", childIndex,
fb->getMangleString().c_str(), childProc.name());
EmitArgs childArgs(args.fBuilder,
childProc,
- outputColor->c_str(),
+ outputColor,
inputColor,
childCoords,
childSamplers);
« no previous file with comments | « src/gpu/gl/GrGLFragmentProcessor.h ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698