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

Unified Diff: tools/bench_pictures_main.cpp

Issue 553583008: Add counting of some GL calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update for merge conflict Created 6 years, 3 months 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 | « tools/PictureBenchmark.h ('k') | tools/render_pictures_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bench_pictures_main.cpp
diff --git a/tools/bench_pictures_main.cpp b/tools/bench_pictures_main.cpp
index 2eda73c40fa245a2197b00ef689d75f72267add4..ade93fc3e6f05108df5aa8695818d41b929269cf 100644
--- a/tools/bench_pictures_main.cpp
+++ b/tools/bench_pictures_main.cpp
@@ -54,6 +54,11 @@ DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod
"SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits when using "
"deferred image decoding.");
+#if GR_GPU_STATS
+DEFINE_bool(gpuStats, false, "Only meaningful with gpu configurations. "
+ "Report some GPU call statistics.");
+#endif
+
DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing before timing.");
// Buildbot-specific parameters
@@ -476,6 +481,15 @@ int tool_main(int argc, char** argv) {
(double) gTotalCacheHits / (gTotalCacheHits + gTotalCacheMisses));
}
#endif
+
+#if GR_GPU_STATS
+ if (FLAGS_gpuStats && benchmark.renderer()->isUsingGpuDevice()) {
+ GrContext* ctx = benchmark.renderer()->getGrContext();
+ SkDebugf("RenderTarget Binds: %d\n", ctx->gpuStats()->renderTargetBinds());
+ SkDebugf("Shader Compilations: %d\n", ctx->gpuStats()->shaderCompilations());
+ }
+#endif
+
gWriter.end();
return 0;
}
« no previous file with comments | « tools/PictureBenchmark.h ('k') | tools/render_pictures_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698