From: robertphillips Date: Tue, 28 Jun 2016 21:45:31 +0000 (-0700) Subject: Spruce up batch info printouts X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~129^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26726d1ca7ed541e63114cd1f3bd2b88a1e2a4a4;p=platform%2Fupstream%2FlibSkiaSharp.git Spruce up batch info printouts GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2107013002 Review-Url: https://codereview.chromium.org/2107013002 --- diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index d498d49..7ddcf1c 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -114,17 +114,13 @@ void GrDrawTarget::dump() const { SkDebugf("\n"); SkDebugf("batches (%d):\n", fBatches.count()); for (int i = 0; i < fBatches.count(); ++i) { -#if 0 SkDebugf("*******************************\n"); -#endif - if (fBatches[i]) { + if (!fBatches[i]) { SkDebugf("%d: \n", i); } else { SkDebugf("%d: %s\n", i, fBatches[i]->name()); -#if 0 SkString str = fBatches[i]->dumpInfo(); SkDebugf("%s\n", str.c_str()); -#endif } } } diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index ea5c18b..f0a9a16 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -67,6 +67,7 @@ void GrDrawingManager::flush() { SkTTopoSort(&fDrawTargets); SkASSERT(result); + // Enable this to print out verbose batching information #if 0 for (int i = 0; i < fDrawTargets.count(); ++i) { SkDEBUGCODE(fDrawTargets[i]->dump();) diff --git a/src/gpu/batches/GrTInstanceBatch.h b/src/gpu/batches/GrTInstanceBatch.h index c501fd9..e63f2e5 100644 --- a/src/gpu/batches/GrTInstanceBatch.h +++ b/src/gpu/batches/GrTInstanceBatch.h @@ -52,6 +52,7 @@ public: SkString dumpInfo() const override { SkString str; + str.appendf("# batched: %d\n", fGeoData.count()); for (int i = 0; i < fGeoData.count(); ++i) { str.append(Impl::DumpInfo(fGeoData[i], i)); }