Remove pipeline info dump from GrDrawBatch
authorBrian Salomon <bsalomon@google.com>
Thu, 1 Dec 2016 14:35:30 +0000 (09:35 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 1 Dec 2016 15:07:31 +0000 (15:07 +0000)
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>

25 files changed:
src/gpu/GrOvalRenderer.cpp
src/gpu/batches/GrAAConvexPathRenderer.cpp
src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
src/gpu/batches/GrAAFillRectBatch.cpp
src/gpu/batches/GrAAHairLinePathRenderer.cpp
src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
src/gpu/batches/GrAAStrokeRectBatch.cpp
src/gpu/batches/GrAnalyticRectBatch.cpp
src/gpu/batches/GrAtlasTextBatch.cpp
src/gpu/batches/GrDefaultPathRenderer.cpp
src/gpu/batches/GrDrawAtlasBatch.h
src/gpu/batches/GrDrawBatch.h
src/gpu/batches/GrDrawPathBatch.cpp
src/gpu/batches/GrDrawVerticesBatch.h
src/gpu/batches/GrMSAAPathRenderer.cpp
src/gpu/batches/GrNinePatch.cpp
src/gpu/batches/GrNonAAFillRectBatch.cpp
src/gpu/batches/GrNonAAFillRectPerspectiveBatch.cpp
src/gpu/batches/GrNonAAStrokeRectBatch.cpp
src/gpu/batches/GrPLSPathRenderer.cpp
src/gpu/batches/GrRegionBatch.cpp
src/gpu/batches/GrShadowRRectBatch.cpp
src/gpu/batches/GrTessellatingPathRenderer.cpp
src/gpu/effects/GrDashingEffect.cpp
src/gpu/instanced/InstancedRendering.h

index fd1d30bd8400a851c83d9f0dec425c875de08a54..ea126b12624068fb3cc958bd04528f1cd9fa0c1d 100644 (file)
@@ -791,6 +791,7 @@ public:
                            fGeoData[i].fInnerRadius,
                            fGeoData[i].fOuterRadius);
         }
+        string.append(DumpPipelineInfo(*this->pipeline()));
         string.append(INHERITED::dumpInfo());
         return string;
     }
@@ -1231,6 +1232,25 @@ public:
 
     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 @@ public:
 
     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 @@ public:
                            fGeoData[i].fInnerRadius,
                            fGeoData[i].fOuterRadius);
         }
+        string.append(DumpPipelineInfo(*this->pipeline()));
         string.append(INHERITED::dumpInfo());
         return string;
     }
@@ -2104,6 +2146,25 @@ public:
 
     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 {
index bec774c281745b629e3036483d29338dd491fd5b..1be84c7ca00b5ff88cee170bf85421f5872ceb95 100644 (file)
@@ -744,6 +744,16 @@ public:
 
     const char* name() const override { return "AAConvexBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x\n", geo.fColor);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index 9f4274ddee4a9280836c0a240a70cd3bb731c05b..e91192733c246c283a2be5209b1a57612af759fb 100644 (file)
@@ -154,6 +154,16 @@ public:
 
     const char* name() const override { return "AADistanceFieldPathBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x AA:%d\n", geo.fColor, geo.fAntiAlias);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index fd2a4c484387755ae532ad5678a1ec7faae5937b..46a5d50955c7fbf8bbf9863775354e95eff083b4 100644 (file)
@@ -191,6 +191,7 @@ public:
                         i, info->color(), rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
             info = this->next(info);
         }
+        str.append(DumpPipelineInfo(*this->pipeline()));
         str.append(INHERITED::dumpInfo());
         return str;
     }
index 70c491111ffcd5671201b5a110c77cb2e5daeb1d..b2ad9ba28ee26acf855528a9fb435a54e0c8a042 100644 (file)
@@ -692,6 +692,16 @@ public:
 
     const char* name() const override { return "AAHairlineBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x Coverage: 0x%02x\n", geo.fColor, geo.fCoverage);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index d53fe9c6cd529e563fd0bdfcb69af70ffd58f5e2..f8516b9df28f55340d6bad4084fea48d6cca627e 100644 (file)
@@ -151,7 +151,19 @@ public:
         this->setTransformedBounds(bounds, viewMatrix, HasAABloat::kYes, IsZeroArea::kNo);
     }
 
-    const char* name() const override { return "AAConvexBatch"; }
+    const char* name() const override { return "AAFlatteningConvexBatch"; }
+
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x, StrokeWidth: %.2f, Style: %d, Join: %d, "
+                           "MiterLimit: %.2f\n",
+                           geo.fColor, geo.fStrokeWidth, geo.fStyle, geo.fJoin, geo.fMiterLimit);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
 
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
index f3c512dcca0d6b8adfec0d873f53b73455919b46..7f87ad6222d79371c99f96c4a52863da96a94a2f 100644 (file)
@@ -152,6 +152,26 @@ public:
 
     const char* name() const override { return "AAStrokeRect"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x, ORect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], "
+                           "AssistORect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], "
+                           "IRect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], Degen: %d",
+                           geo.fColor,
+                           geo.fDevOutside.fLeft, geo.fDevOutside.fTop,
+                           geo.fDevOutside.fRight, geo.fDevOutside.fBottom,
+                           geo.fDevOutsideAssist.fLeft, geo.fDevOutsideAssist.fTop,
+                           geo.fDevOutsideAssist.fRight, geo.fDevOutsideAssist.fBottom,
+                           geo.fDevInside.fLeft, geo.fDevInside.fTop,
+                           geo.fDevInside.fRight, geo.fDevInside.fBottom,
+                           geo.fDegenerate);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index fb343df602cf0d76391aefa93bb4442b761e2400..655644f048e798fa4d6d3998a9176e00c4e437bc 100644 (file)
@@ -270,6 +270,7 @@ public:
                            fGeoData[i].fHalfWidth,
                            fGeoData[i].fHalfHeight);
         }
+        string.append(DumpPipelineInfo(*this->pipeline()));
         string.append(INHERITED::dumpInfo());
         return string;
     }
index fe5c3b92e61994583b0baf72b5268de040fcaf89..cf4ca24aa8076ad5aa67e0bbc03757475924e5a6 100644 (file)
@@ -40,6 +40,7 @@ SkString GrAtlasTextBatch::dumpInfo() const {
                     fGeoData[i].fBlob->runCount());
     }
 
+    str.append(DumpPipelineInfo(*this->pipeline()));
     str.append(INHERITED::dumpInfo());
     return str;
 }
index 2fbc90b102bc87cb8ab08cd24a6d021da0a50e73..21e2289df3830baf956d963f884d8987a7e42026 100644 (file)
@@ -113,6 +113,16 @@ public:
 
     const char* name() const override { return "DefaultPathBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x Tolerance: %.2f\n", geo.fColor, geo.fTolerance);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index d9adf22a60a986e66247c84148ff8a97e7f4ab0a..f8d88e0c2036d6cd430078b3d33071879765658b 100644 (file)
@@ -21,6 +21,16 @@ public:
 
     const char* name() const override { return "DrawAtlasBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Color: 0x%08x, Quads: %d\n", geo.fColor, geo.fVerts.count() / 4);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index 95516c93639360a64f266d5075b8ea568823498b..c92dca346a9b9c9c82fe3ffe1ebfd3cd7b8e9481 100644 (file)
@@ -75,40 +75,38 @@ public:
         return this->pipeline()->getRenderTarget()->uniqueID();
     }
 
-    SkString dumpInfo() const override {
+protected:
+    static SkString DumpPipelineInfo(const GrPipeline& pipeline) {
         SkString string;
-        string.appendf("RT: %d\n", this->renderTargetUniqueID().asUInt());
+        string.appendf("RT: %d\n", pipeline.getRenderTarget()->uniqueID().asUInt());
         string.append("ColorStages:\n");
-        for (int i = 0; i < this->pipeline()->numColorFragmentProcessors(); i++) {
+        for (int i = 0; i < pipeline.numColorFragmentProcessors(); i++) {
             string.appendf("\t\t%s\n\t\t%s\n",
-                           this->pipeline()->getColorFragmentProcessor(i).name(),
-                           this->pipeline()->getColorFragmentProcessor(i).dumpInfo().c_str());
+                           pipeline.getColorFragmentProcessor(i).name(),
+                           pipeline.getColorFragmentProcessor(i).dumpInfo().c_str());
         }
         string.append("CoverageStages:\n");
-        for (int i = 0; i < this->pipeline()->numCoverageFragmentProcessors(); i++) {
+        for (int i = 0; i < pipeline.numCoverageFragmentProcessors(); i++) {
             string.appendf("\t\t%s\n\t\t%s\n",
-                           this->pipeline()->getCoverageFragmentProcessor(i).name(),
-                           this->pipeline()->getCoverageFragmentProcessor(i).dumpInfo().c_str());
+                           pipeline.getCoverageFragmentProcessor(i).name(),
+                           pipeline.getCoverageFragmentProcessor(i).dumpInfo().c_str());
         }
-        string.appendf("XP: %s\n", this->pipeline()->getXferProcessor().name());
+        string.appendf("XP: %s\n", pipeline.getXferProcessor().name());
 
-        bool scissorEnabled = this->pipeline()->getScissorState().enabled();
+        bool scissorEnabled = pipeline.getScissorState().enabled();
         string.appendf("Scissor: ");
         if (scissorEnabled) {
             string.appendf("[L: %d, T: %d, R: %d, B: %d]\n",
-                           this->pipeline()->getScissorState().rect().fLeft,
-                           this->pipeline()->getScissorState().rect().fTop,
-                           this->pipeline()->getScissorState().rect().fRight,
-                           this->pipeline()->getScissorState().rect().fBottom);
+                           pipeline.getScissorState().rect().fLeft,
+                           pipeline.getScissorState().rect().fTop,
+                           pipeline.getScissorState().rect().fRight,
+                           pipeline.getScissorState().rect().fBottom);
         } else {
             string.appendf("<disabled>\n");
         }
-        string.append(INHERITED::dumpInfo());
-
         return string;
     }
 
-protected:
     const GrPipeline* pipeline() const {
         SkASSERT(fPipelineInstalled);
         return reinterpret_cast<const GrPipeline*>(fPipelineStorage.get());
index 6522fb5da08c44b50ec9bc325d4a88dc502a48e2..fb458ec7cc3ec151431f72e40bf23a047d707574 100644 (file)
@@ -22,6 +22,7 @@ void GrDrawPathBatchBase::onPrepare(GrBatchFlushState*) {
 SkString GrDrawPathBatch::dumpInfo() const {
     SkString string;
     string.printf("PATH: 0x%p", fPath.get());
+    string.append(DumpPipelineInfo(*this->pipeline()));
     string.append(INHERITED::dumpInfo());
     return string;
 }
@@ -44,6 +45,7 @@ SkString GrDrawPathRangeBatch::dumpInfo() const {
     }
     string.remove(string.size() - 2, 2);
     string.append("]");
+    string.append(DumpPipelineInfo(*this->pipeline()));
     string.append(INHERITED::dumpInfo());
     return string;
 }
index 9665c1a905a84005277dbcbb925190ea1c6d456a..d71fb0daba3138a5fc25e3d6ecd1179194ad22c9 100644 (file)
@@ -31,6 +31,15 @@ public:
 
     const char* name() const override { return "DrawVerticesBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        string.appendf("PrimType: %d, VarColor: %d, VCount: %d, ICount: %d\n",
+                       fPrimitiveType, fVariableColor, fVertexCount, fIndexCount);
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override;
index a1fc635c611f4edd27e121dc1306443300d8aea9..ab98a15055ab3e526fd140535249f2fa0850d8f7 100644 (file)
@@ -233,6 +233,17 @@ public:
 
     const char* name() const override { return "MSAAPathBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        string.appendf("Indexed: %d\n", fIsIndexed);
+        for (const auto& path : fPaths) {
+            string.appendf("Color: 0x%08x\n", path.fColor);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index 5e0be737ae81dc3e62d68c46a4442c3f15b17d73..2e1809d754a5da9898f0f04e314ca1164723eab1 100644 (file)
@@ -59,6 +59,7 @@ public:
                         fPatches[i].fDst.fRight, fPatches[i].fDst.fBottom);
         }
 
+        str.append(DumpPipelineInfo(*this->pipeline()));
         str.append(INHERITED::dumpInfo());
         return str;
     }
index cc89d03870fb2a8689b6cad32151f1a132f70d14..0e66134795f13386868b8702934cdaddbc3af712 100644 (file)
@@ -107,6 +107,7 @@ public:
                         i, info.fColor,
                         info.fRect.fLeft, info.fRect.fTop, info.fRect.fRight, info.fRect.fBottom);
         }
+        str.append(DumpPipelineInfo(*this->pipeline()));
         str.append(INHERITED::dumpInfo());
         return str;
     }
index 0652580aa25d369788745c752774c216452df450..9a946c80f6acb5e5f4f06d8b261cc7d456dd42c7 100644 (file)
@@ -125,6 +125,7 @@ public:
                         i, geo.fColor,
                         geo.fRect.fLeft, geo.fRect.fTop, geo.fRect.fRight, geo.fRect.fBottom);
         }
+        str.append(DumpPipelineInfo(*this->pipeline()));
         str.append(INHERITED::dumpInfo());
         return str;
     }
index f443b32f19f8d2313b895a7e732357995541c547..9139dab9fe2eb772f61b2e579fb00a99478016e8 100644 (file)
@@ -51,6 +51,17 @@ public:
 
     const char* name() const override { return "NonAAStrokeRectBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        string.appendf("Color: 0x%08x, Rect [L: %.2f, T: %.2f, R: %.2f, B: %.2f], "
+                       "StrokeWidth: %.2f\n",
+                       fColor, fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom,
+                       fStrokeWidth);
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index a41e1401ca82e6eb3e3016741299cd312d12079e..f31c323581f95cad25398ae3989f5940d8e0d2e2 100644 (file)
@@ -778,6 +778,14 @@ public:
 
     const char* name() const override { return "PLSBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        string.printf("Color 0x%08x, UsesLocalCoords: %d\n", fColor, fUsesLocalCoords);
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
@@ -927,8 +935,7 @@ bool GrPLSPathRenderer::onDrawPath(const DrawPathArgs& args) {
     SkPath path;
     args.fShape->asPath(&path);
 
-    sk_sp<GrDrawBatch> batch(new PLSPathBatch(args.fPaint->getColor(),
-                                              path, *args.fViewMatrix));
+    sk_sp<GrDrawBatch> batch(new PLSPathBatch(args.fPaint->getColor(), path, *args.fViewMatrix));
 
     GrPipelineBuilder pipelineBuilder(*args.fPaint,
                                       args.fRenderTargetContext->mustUseHWAA(*args.fPaint));
index 47b6f6777d61f360cc0c81ecedefd33435b5c0ab..ae09a5f290779a0735376c84860f80d6575a0482 100644 (file)
@@ -76,6 +76,7 @@ public:
             str.appendf("%d: Color: 0x%08x, Region with %d rects\n",
                         i, info.fColor, info.fRegion.computeRegionComplexity());
         }
+        str.append(DumpPipelineInfo(*this->pipeline()));
         str.append(INHERITED::dumpInfo());
         return str;
     }
index 08f7e869521319f366fb2b370174059ec2bbbf3b..c4b56b8e18b6d7cdb573055d4895cc181e20bfe8 100755 (executable)
@@ -143,6 +143,7 @@ public:
                            fGeoData[i].fOuterRadius, fGeoData[i].fInnerRadius,
                            fGeoData[i].fBlurRadius);
         }
+        string.append(DumpPipelineInfo(*this->pipeline()));
         string.append(INHERITED::dumpInfo());
         return string;
     }
@@ -574,6 +575,7 @@ public:
                            fGeoData[i].fOuterRadius, fGeoData[i].fInnerRadius,
                            fGeoData[i].fBlurRadius);
         }
+        string.append(DumpPipelineInfo(*this->pipeline()));
         string.append(INHERITED::dumpInfo());
         return string;
     }
index 8e17ea4f6184e22d60d132edab20f6c5340217a6..970af5cd5c8ce7417c476f98ae222bd401fb7e52 100644 (file)
@@ -174,6 +174,14 @@ public:
 
     const char* name() const override { return "TessellatingPathBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        string.appendf("Color 0x%08x, aa: %d\n", fColor, fAntiAlias);
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index 669e604725d9f41cca1199c925ae89bc871a1548..d9cb72f1920b67d10d20b6156e6bbe3b3d2bb459 100644 (file)
@@ -260,6 +260,23 @@ public:
 
     const char* name() const override { return "DashBatch"; }
 
+    SkString dumpInfo() const override {
+        SkString string;
+        for (const auto& geo : fGeoData) {
+            string.appendf("Pt0: [%.2f, %.2f], Pt1: [%.2f, %.2f], Width: %.2f, Ival0: %.2f, "
+                           "Ival1 : %.2f, Phase: %.2f\n",
+                           geo.fPtsRot[0].fX, geo.fPtsRot[0].fY,
+                           geo.fPtsRot[1].fX, geo.fPtsRot[1].fY,
+                           geo.fSrcStrokeWidth,
+                           geo.fIntervals[0],
+                           geo.fIntervals[1],
+                           geo.fPhase);
+        }
+        string.append(DumpPipelineInfo(*this->pipeline()));
+        string.append(INHERITED::dumpInfo());
+        return string;
+    }
+
     void computePipelineOptimizations(GrInitInvariantOutput* color,
                                       GrInitInvariantOutput* coverage,
                                       GrBatchToXPOverrides* overrides) const override {
index 97d6e1963d9ea151b72b41d607bbca422eb5ad28..faa5471f440ee2e27568bd2f5ab8323475226815 100644 (file)
@@ -100,6 +100,25 @@ protected:
         ~Batch() override;
         const char* name() const override { return "Instanced Batch"; }
 
+        SkString dumpInfo() const override {
+            SkString string;
+            string.printf("AA: %d, ShapeTypes: 0x%02x, IShapeTypes: 0x%02x, Persp %d, "
+                          "NonSquare: %d, PLoad: %0.2f, Tracked: %d, NumDraws: %d, "
+                          "GeomChanges: %d\n",
+                          (int)fInfo.fAntialiasMode,
+                          fInfo.fShapeTypes,
+                          fInfo.fInnerShapeTypes,
+                          fInfo.fHasPerspective,
+                          fInfo.fNonSquare,
+                          fPixelLoad,
+                          fIsTracked,
+                          fNumDraws,
+                          fNumChangesInGeometry);
+            string.append(DumpPipelineInfo(*this->pipeline()));
+            string.append(INHERITED::dumpInfo());
+            return string;
+        }
+
         struct Draw {
             Instance     fInstance;
             IndexRange   fGeometry;