Remove shader text trace events and simplify the SKSL/GLSL printing code
- Moves the pretty-printer and line-by-line printer into a new GrShaderUtils.
- Maintain strings as SkSL::String longer, to avoid possibly re-converting
from char* when we need to print them.
- GL shader compilation doesn't need the SkSL settings, so stop plumbing that.
- Converting SkSL to GLSL was taking the GL enum to specify the kind of shader,
but only used it to convert to a SkSL::Program::Kind. Just take that. To make
this simpler, move the GLSL printing code into that function, clumped with
the SkSL printing code. Reuse that banner printer in GrGLPrintShader, too.
Change-Id: I4536547604612a6fa1596e5a8e97f6322e12a1fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211583
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/gn/gpu.gni b/gn/gpu.gni
index dbce1fc..3f8c4d2 100644
--- a/gn/gpu.gni
+++ b/gn/gpu.gni
@@ -209,10 +209,10 @@
"$_src/gpu/GrTracing.h",
"$_src/gpu/GrTestUtils.cpp",
"$_src/gpu/GrTestUtils.h",
+ "$_src/gpu/GrShaderUtils.cpp",
+ "$_src/gpu/GrShaderUtils.h",
"$_src/gpu/GrShaderVar.cpp",
"$_src/gpu/GrShaderVar.h",
- "$_src/gpu/GrSKSLPrettyPrint.cpp",
- "$_src/gpu/GrSKSLPrettyPrint.h",
"$_src/gpu/GrSoftwarePathRenderer.cpp",
"$_src/gpu/GrSoftwarePathRenderer.h",
"$_src/gpu/GrSurfacePriv.h",