Add `GrProcessor::onDumpInfo` for subclass info dumps.
This CL also marks `GrProcessor::dumpInfo` as final. This prevents a
subclass from mistakenly overriding `dumpInfo` instead of `onDumpInfo`.
`onDumpInfo` is responsible for providing the same data as `dumpInfo`,
except that the FP name is automatically prepended.
Change-Id: I2b44c30a01bc65e9d88321cc21651a94e20074c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309793
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/gpu/effects/generated/GrAARectEffect.cpp b/src/gpu/effects/generated/GrAARectEffect.cpp
index 28b38ea..1a09603 100644
--- a/src/gpu/effects/generated/GrAARectEffect.cpp
+++ b/src/gpu/effects/generated/GrAARectEffect.cpp
@@ -111,9 +111,9 @@
return std::make_unique<GrAARectEffect>(*this);
}
#if GR_TEST_UTILS
-SkString GrAARectEffect::dumpInfo() const {
- return SkStringPrintf("AARectEffect(edgeType=%d, rect=float4(%f, %f, %f, %f))", (int)edgeType,
- rect.left(), rect.top(), rect.right(), rect.bottom());
+SkString GrAARectEffect::onDumpInfo() const {
+ return SkStringPrintf("(edgeType=%d, rect=float4(%f, %f, %f, %f))", (int)edgeType, rect.left(),
+ rect.top(), rect.right(), rect.bottom());
}
#endif
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrAARectEffect);