Add more batch information printouts

Review URL: https://codereview.chromium.org/1457373003
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 37fe092..09190c4 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1335,6 +1335,22 @@
 
     const char* name() const override { return "TextBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString str;
+
+        for (int i = 0; i < fGeoCount; ++i) {
+            str.appendf("%d: Color: 0x%08x Trans: %.2f,%.2f Runs: %d\n",
+                        i,
+                        fGeoData[i].fColor,
+                        fGeoData[i].fTransX,
+                        fGeoData[i].fTransY,
+                        fGeoData[i].fBlob->fRunCount);
+        }
+
+        str.append(INHERITED::dumpInfo());
+        return str;
+    }
+
     void getInvariantOutputColor(GrInitInvariantOutput* out) const override {
         if (kColorBitmapMask_MaskType == fMaskType) {
             out->setUnknownFourComponents();
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index 1b3f139..e2b088c 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -217,9 +217,10 @@
 
     static const char* Name() { return "AAFillRectBatchNoLocalMatrix"; }
 
-    static SkString DumpInfo(const Geometry& geo) {
+    static SkString DumpInfo(const Geometry& geo, int index) {
         SkString str;
-        str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+        str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+                    index,
                     geo.fColor,
                     geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
         return str;
@@ -266,9 +267,10 @@
 
     static const char* Name() { return "AAFillRectBatchLocalMatrix"; }
 
-    static SkString DumpInfo(const Geometry& geo) {
+    static SkString DumpInfo(const Geometry& geo, int index) {
         SkString str;
-        str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+        str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+                    index,
                     geo.fColor,
                     geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
         return str;
diff --git a/src/gpu/batches/GrNinePatch.cpp b/src/gpu/batches/GrNinePatch.cpp
index 4c6310c..999e1fd 100644
--- a/src/gpu/batches/GrNinePatch.cpp
+++ b/src/gpu/batches/GrNinePatch.cpp
@@ -54,7 +54,25 @@
         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();
diff --git a/src/gpu/batches/GrNonAAFillRectBatch.cpp b/src/gpu/batches/GrNonAAFillRectBatch.cpp
index 3ad869b..5f37741 100644
--- a/src/gpu/batches/GrNonAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrNonAAFillRectBatch.cpp
@@ -124,9 +124,10 @@
 
     static const char* Name() { return "NonAAFillRectBatch"; }
 
-    static SkString DumpInfo(const Geometry& geo) {
+    static SkString DumpInfo(const Geometry& geo, int index) {
         SkString str;
-        str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+        str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+                    index,
                     geo.fColor,
                     geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
         return str;
@@ -168,9 +169,10 @@
 
     static const char* Name() { return "NonAAFillRectBatchPerspective"; }
 
-    static SkString DumpInfo(const Geometry& geo) {
+    static SkString DumpInfo(const Geometry& geo, int index) {
         SkString str;
-        str.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+        str.appendf("%d: Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+                    index,
                     geo.fColor,
                     geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
         return str;
diff --git a/src/gpu/batches/GrTInstanceBatch.h b/src/gpu/batches/GrTInstanceBatch.h
index 86d85b6..5dc5988 100644
--- a/src/gpu/batches/GrTInstanceBatch.h
+++ b/src/gpu/batches/GrTInstanceBatch.h
@@ -53,7 +53,7 @@
     SkString dumpInfo() const override {
         SkString str;
         for (int i = 0; i < fGeoData.count(); ++i) {
-            str.append(Impl::DumpInfo(fGeoData[i]));
+            str.append(Impl::DumpInfo(fGeoData[i], i));
         }
         str.append(INHERITED::dumpInfo());
         return str;
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index 3706c99..6ff4d32 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -154,6 +154,15 @@
 
     const char* name() const override { return "ComposeOne"; }
 
+    SkString dumpInfo() const override {
+        SkString str;
+
+        for (int i = 0; i < this->numChildProcessors(); ++i) {
+            str.append(this->childProcessor(i).dumpInfo());
+        }
+        return str;
+    }
+
     void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
         GR_STATIC_ASSERT((SkXfermode::kLastMode & SK_MaxU16) == SkXfermode::kLastMode);
         b->add32(fMode | (fChild << 16));