diff options
author | egdaniel <egdaniel@google.com> | 2014-11-19 06:22:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-19 06:22:39 -0800 |
commit | ec03a4608025106ea3f21353865c7d302c0a13c6 (patch) | |
tree | 06ea08866680ce7abe2fdc7cdca0eb0321684ace | |
parent | b07a94f1cba3976596ae1a7f23d8c2043ba353f3 (diff) |
Add processor name to comment when printing out shaders.
BUG=skia:
Review URL: https://codereview.chromium.org/735153002
-rw-r--r-- | include/gpu/GrProcessorStage.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.cpp | 2 |
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(), |