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

Unified Diff: tools/render_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/bench_pictures_main.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/render_pictures_main.cpp
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp
index 4fb83521c8c3e05e6661463aaf2d9172430dcf78..d7a213cb47e74650db2885c7c75b96b3c04205a9 100644
--- a/tools/render_pictures_main.cpp
+++ b/tools/render_pictures_main.cpp
@@ -36,6 +36,10 @@ DEFINE_int32(maxComponentDiff, 256, "Maximum diff on a component, 0 - 256. Compo
"Requires --validate.");
DEFINE_string(mismatchPath, "", "Write images for tests that failed due to "
"pixel mismatches into this directory.");
+#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 rendering.");
DEFINE_string(readJsonSummaryPath, "", "JSON file to read image expectations from.");
DECLARE_string(readPath);
@@ -496,6 +500,13 @@ int tool_main(int argc, char** argv) {
#endif
}
#endif
+#if GR_GPU_STATS
+ if (FLAGS_gpuStats && renderer->isUsingGpuDevice()) {
+ GrContext* ctx = renderer->getGrContext();
+ SkDebugf("RenderTarget Binds: %d\n", ctx->gpuStats()->renderTargetBinds());
+ SkDebugf("Shader Compilations: %d\n", ctx->gpuStats()->shaderCompilations());
+ }
+#endif
#endif
if (FLAGS_writeJsonSummaryPath.count() == 1) {
// If there were any descriptions on the command line, insert them now.
« no previous file with comments | « tools/bench_pictures_main.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698