Remove pipeline info dump from GrDrawBatch
Also adds more overrides of GrBatch::dumpInfo.
This removes a use case of the GrPipeline member of GrDrawBatch.
Change-Id: I93f5f2993be41ffa290122f12a683d2bac453e1d
Reviewed-on: https://skia-review.googlesource.com/5354
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index fd1d30b..ea126b1 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -791,6 +791,7 @@
fGeoData[i].fInnerRadius,
fGeoData[i].fOuterRadius);
}
+ string.append(DumpPipelineInfo(*this->pipeline()));
string.append(INHERITED::dumpInfo());
return string;
}
@@ -1231,6 +1232,25 @@
const char* name() const override { return "EllipseBatch"; }
+ SkString dumpInfo() const override {
+ SkString string;
+ string.appendf("Stroked: %d\n", fStroked);
+ for (const auto& geo : fGeoData) {
+ string.appendf("Color: 0x%08x Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], "
+ "XRad: %.2f, YRad: %.2f, InnerXRad: %.2f, InnerYRad: %.2f\n",
+ geo.fColor,
+ geo.fDevBounds.fLeft, geo.fDevBounds.fTop,
+ geo.fDevBounds.fRight, geo.fDevBounds.fBottom,
+ geo.fXRadius,
+ geo.fYRadius,
+ geo.fInnerXRadius,
+ geo.fInnerYRadius);
+ }
+ string.append(DumpPipelineInfo(*this->pipeline()));
+ string.append(INHERITED::dumpInfo());
+ return string;
+ }
+
void computePipelineOptimizations(GrInitInvariantOutput* color,
GrInitInvariantOutput* coverage,
GrBatchToXPOverrides* overrides) const override {
@@ -1443,6 +1463,27 @@
const char* name() const override { return "DIEllipseBatch"; }
+ SkString dumpInfo() const override {
+ SkString string;
+ for (const auto& geo : fGeoData) {
+ string.appendf("Color: 0x%08x Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], XRad: %.2f, "
+ "YRad: %.2f, InnerXRad: %.2f, InnerYRad: %.2f, GeoDX: %.2f, "
+ "GeoDY: %.2f\n",
+ geo.fColor,
+ geo.fBounds.fLeft, geo.fBounds.fTop,
+ geo.fBounds.fRight, geo.fBounds.fBottom,
+ geo.fXRadius,
+ geo.fYRadius,
+ geo.fInnerXRadius,
+ geo.fInnerYRadius,
+ geo.fGeoDx,
+ geo.fGeoDy);
+ }
+ string.append(DumpPipelineInfo(*this->pipeline()));
+ string.append(INHERITED::dumpInfo());
+ return string;
+ }
+
void computePipelineOptimizations(GrInitInvariantOutput* color,
GrInitInvariantOutput* coverage,
GrBatchToXPOverrides* overrides) const override {
@@ -1754,6 +1795,7 @@
fGeoData[i].fInnerRadius,
fGeoData[i].fOuterRadius);
}
+ string.append(DumpPipelineInfo(*this->pipeline()));
string.append(INHERITED::dumpInfo());
return string;
}
@@ -2104,6 +2146,25 @@
const char* name() const override { return "RRectEllipseRendererBatch"; }
+ SkString dumpInfo() const override {
+ SkString string;
+ string.appendf("Stroked: %d\n", fStroked);
+ for (const auto& geo : fGeoData) {
+ string.appendf("Color: 0x%08x Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], "
+ "XRad: %.2f, YRad: %.2f, InnerXRad: %.2f, InnerYRad: %.2f\n",
+ geo.fColor,
+ geo.fDevBounds.fLeft, geo.fDevBounds.fTop,
+ geo.fDevBounds.fRight, geo.fDevBounds.fBottom,
+ geo.fXRadius,
+ geo.fYRadius,
+ geo.fInnerXRadius,
+ geo.fInnerYRadius);
+ }
+ string.append(DumpPipelineInfo(*this->pipeline()));
+ string.append(INHERITED::dumpInfo());
+ return string;
+ }
+
void computePipelineOptimizations(GrInitInvariantOutput* color,
GrInitInvariantOutput* coverage,
GrBatchToXPOverrides* overrides) const override {