Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: src/gpu/batches/GrNinePatch.cpp

Issue 1457373003: Add more batch information printouts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrNonAAFillRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrNinePatch.cpp
diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp
index 4c6310ccd495b01bf11ce93f3d1c84145d7e6e2d..999e1fd1562dbbeb54d42d5085e00f5a7211cee7 100644
--- a/src/gpu/batches/GrNinePatch.cpp
+++ b/src/gpu/batches/GrNinePatch.cpp
@@ -54,7 +54,25 @@ public:
geo.fViewMatrix.mapRect(&fBounds, geo.fDst);
}
- const char* name() const override { return "GrNonAANinePatchBatch"; }
+ const char* name() const override { return "NonAANinePatchBatch"; }
+
+ SkString dumpInfo() const override {
+ SkString str;
+
+ for (int i = 0; i < fGeoData.count(); ++i) {
+ str.appendf("%d: Color: 0x%08x Center [L: %d, T: %d, R: %d, B: %d], "
+ "Dst [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ i,
+ fGeoData[i].fColor,
+ fGeoData[i].fCenter.fLeft, fGeoData[i].fCenter.fTop,
+ fGeoData[i].fCenter.fRight, fGeoData[i].fCenter.fBottom,
+ fGeoData[i].fDst.fLeft, fGeoData[i].fDst.fTop,
+ fGeoData[i].fDst.fRight, fGeoData[i].fDst.fBottom);
+ }
+
+ str.append(INHERITED::dumpInfo());
+ return str;
+ }
void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
out->setUnknownFourComponents();
« no previous file with comments | « src/gpu/batches/GrAAFillRectBatch.cpp ('k') | src/gpu/batches/GrNonAAFillRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698