Renamed the various 'stage' shader functions to have the actual effect name

This is purely to make debugging easier, as the shaders now make more sense
to read.

Change-Id: Ie8e9b9d36112fda3ff997d088955de5a0e2c787a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281017
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
Ethan Nicholas 2020-04-01 14:18:28 -04:00 committed by Skia Commit-Bot
parent d84b691950
commit 7c75226854
4 changed files with 4 additions and 4 deletions

View File

@ -490,7 +490,7 @@ public:
if (!this->totalLocalMatrix(args.fPreLocalMatrix)->invert(&matrix)) {
return nullptr;
}
auto fp = GrSkSLFP::Make(args.fContext, fEffect, "runtime-shader", fInputs, &matrix);
auto fp = GrSkSLFP::Make(args.fContext, fEffect, "runtime_shader", fInputs, &matrix);
for (const auto& child : fChildren) {
auto childFP = child ? as_SB(child)->asFragmentProcessor(args) : nullptr;
if (!childFP) {

View File

@ -176,7 +176,7 @@ public:
virtual ~GrProcessor() = default;
/** Human-meaningful string to identify this prcoessor; may be embedded in generated shader
code. */
code and must be a legal identifier. */
virtual const char* name() const = 0;
/** Human-readable dump of all information */

View File

@ -187,7 +187,7 @@ SkString GrGLSLFPFragmentBuilder::writeProcessorFunction(GrGLSLFragmentProcessor
GrShaderVar("_coords", kFloat2_GrSLType) };
SkString result;
this->emitFunction(kHalf4_GrSLType,
"stage",
args.fFp.name(),
args.fFp.isSampledWithExplicitCoords() ? 2 : 1,
params,
this->code().c_str(),

View File

@ -66,7 +66,7 @@ public:
return std::unique_ptr<GrFragmentProcessor>(new BigKeyProcessor);
}
const char* name() const override { return "Big Ole Key"; }
const char* name() const override { return "Big_Ole_Key"; }
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GLBigKeyProcessor;