aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2014-11-19 06:22:39 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-19 06:22:39 -0800
commitec03a4608025106ea3f21353865c7d302c0a13c6 (patch)
tree06ea08866680ce7abe2fdc7cdca0eb0321684ace
parentb07a94f1cba3976596ae1a7f23d8c2043ba353f3 (diff)
Add processor name to comment when printing out shaders.
-rw-r--r--include/gpu/GrProcessorStage.h2
-rw-r--r--src/gpu/gl/builders/GrGLProgramBuilder.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/gpu/GrProcessorStage.h b/include/gpu/GrProcessorStage.h
index 6f8496db06..0f24a30a32 100644
--- a/include/gpu/GrProcessorStage.h
+++ b/include/gpu/GrProcessorStage.h
@@ -146,6 +146,8 @@ public:
}
}
+ const char* name() const { return fProc->name(); }
+
const GrFragmentProcessor* getProcessor() const { return fProc.get(); }
void convertToPendingExec() { fProc.convertToPendingExec(); }
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 62032f89c6..f628db9289 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -296,7 +296,7 @@ void GrGLProgramBuilder::emitAndInstallProc(const Proc& proc,
// Enclose custom code in a block to avoid namespace conflicts
SkString openBrace;
- openBrace.printf("{ // Stage %d\n", fStageIndex);
+ openBrace.printf("{ // Stage %d, %s\n", fStageIndex, proc.name());
fFS.codeAppend(openBrace.c_str());
this->emitAndInstallProc(proc, keyProvider.get(index), output->c_str(),