Dump out path-mask generation and caching stats
These stats would've helped block https://skia-review.googlesource.com/c/skia/+/286902 (Add path bounds to SW path mask key) from landing.
Change-Id: I684f39de53fb2678c7a679e4e4aafdbb39a154ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287499
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrContextPriv.cpp b/src/gpu/GrContextPriv.cpp
index cc2fbea..0c6eb1d 100644
--- a/src/gpu/GrContextPriv.cpp
+++ b/src/gpu/GrContextPriv.cpp
@@ -80,13 +80,7 @@
//////////////////////////////////////////////////////////////////////////////
-
#if GR_TEST_UTILS
-void GrContextPriv::resetGpuStats() const {
-#if GR_GPU_STATS
- fContext->fGpu->stats()->reset();
-#endif
-}
void GrContextPriv::dumpCacheStats(SkString* out) const {
#if GR_CACHE_STATS
@@ -107,6 +101,13 @@
SkDebugf("%s", out.c_str());
}
+/////////////////////////////////////////////////
+void GrContextPriv::resetGpuStats() const {
+#if GR_GPU_STATS
+ fContext->fGpu->stats()->reset();
+#endif
+}
+
void GrContextPriv::dumpGpuStats(SkString* out) const {
#if GR_GPU_STATS
return fContext->fGpu->stats()->dump(out);
@@ -126,6 +127,33 @@
SkDebugf("%s", out.c_str());
}
+/////////////////////////////////////////////////
+void GrContextPriv::resetContextStats() const {
+#if GR_GPU_STATS
+ fContext->stats()->reset();
+#endif
+}
+
+void GrContextPriv::dumpContextStats(SkString* out) const {
+#if GR_GPU_STATS
+ return fContext->stats()->dump(out);
+#endif
+}
+
+void GrContextPriv::dumpContextStatsKeyValuePairs(SkTArray<SkString>* keys,
+ SkTArray<double>* values) const {
+#if GR_GPU_STATS
+ return fContext->stats()->dumpKeyValuePairs(keys, values);
+#endif
+}
+
+void GrContextPriv::printContextStats() const {
+ SkString out;
+ this->dumpContextStats(&out);
+ SkDebugf("%s", out.c_str());
+}
+
+/////////////////////////////////////////////////
void GrContextPriv::testingOnly_setTextBlobCacheLimit(size_t bytes) {
fContext->priv().getTextBlobCache()->setBudget(bytes);
}