Update GrOp subclasses to use `onDumpInfo` for info dumping.
This is meant to parallel the changes in http://review.skia.org/309793,
but for GrOps. The base-class info is automatically appended without
subclasses manually calling `append(INHERITED::dumpInfo())`.
Change-Id: Ic815305feeeca07385687af5703f0dd88a008f9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309879
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 35c4f8c..fac22ae 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -181,11 +181,11 @@
/** Used for spewing information about ops when debugging. */
#if GR_TEST_UTILS
- virtual SkString dumpInfo() const {
- SkString string;
- string.appendf("OpBounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
- fBounds.fLeft, fBounds.fTop, fBounds.fRight, fBounds.fBottom);
- return string;
+ virtual SkString onDumpInfo() const { return SkString(); }
+ virtual SkString dumpInfo() const final {
+ return SkStringPrintf("%s\nOpBounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]",
+ this->onDumpInfo().c_str(), fBounds.fLeft, fBounds.fTop,
+ fBounds.fRight, fBounds.fBottom);
}
#endif