Move `onDumpInfo` calls in gencode to the private section.
`onXxxxx` methods in Skia generally appear to be non-public, which I did
not realize until after originally implementing this task.
Followup CLs will update the non-gencode `onDumpInfo` methods to be
private as well.
Change-Id: I807eee132b080f72f6b040e1ca7f687be25dff11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309883
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp
index 0cbb3d0..8af06c5 100644
--- a/src/sksl/SkSLHCodeGenerator.cpp
+++ b/src/sksl/SkSLHCodeGenerator.cpp
@@ -334,17 +334,17 @@
this->writef(kFragmentProcessorHeader, fFullName.c_str());
this->writef("#ifndef %s_DEFINED\n"
"#define %s_DEFINED\n"
+ "\n"
+ "#include \"include/core/SkM44.h\"\n"
+ "#include \"include/core/SkTypes.h\"\n"
"\n",
fFullName.c_str(),
fFullName.c_str());
- this->writef("#include \"include/core/SkM44.h\"\n"
- "#include \"include/core/SkTypes.h\"\n"
- "\n");
this->writeSection(kHeaderSection);
this->writef("\n"
"#include \"src/gpu/GrFragmentProcessor.h\"\n"
- "\n");
- this->writef("class %s : public GrFragmentProcessor {\n"
+ "\n"
+ "class %s : public GrFragmentProcessor {\n"
"public:\n",
fFullName.c_str());
for (const auto& p : fProgram) {
@@ -355,9 +355,6 @@
this->writeSection(kClassSection);
this->writeMake();
this->writef(" %s(const %s& src);\n"
- "#if GR_TEST_UTILS\n"
- " SkString onDumpInfo() const override;\n"
- "#endif\n"
" std::unique_ptr<GrFragmentProcessor> clone() const override;\n"
" const char* name() const override { return \"%s\"; }\n",
fFullName.c_str(), fFullName.c_str(), fName.c_str());
@@ -365,7 +362,7 @@
this->writef("private:\n");
this->writeConstructor();
this->writef(" GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;\n"
- " void onGetGLSLProcessorKey(const GrShaderCaps&,"
+ " void onGetGLSLProcessorKey(const GrShaderCaps&, "
"GrProcessorKeyBuilder*) const override;\n"
" bool onIsEqual(const GrFragmentProcessor&) const override;\n");
for (const auto& param : fSectionAndParameterHelper.getParameters()) {
@@ -374,9 +371,12 @@
break;
}
}
- this->writef(" GR_DECLARE_FRAGMENT_PROCESSOR_TEST\n");
- this->writef(" typedef GrFragmentProcessor INHERITED;\n"
- "};\n");
+ this->writef("#if GR_TEST_UTILS\n"
+ " SkString onDumpInfo() const override;\n"
+ "#endif\n"
+ " GR_DECLARE_FRAGMENT_PROCESSOR_TEST\n"
+ " typedef GrFragmentProcessor INHERITED;\n"
+ "};\n");
this->writeSection(kHeaderEndSection);
this->writef("#endif\n");
return 0 == fErrors.errorCount();