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

Unified Diff: bench/benchmain.cpp

Issue 143943009: add leaks flag to show unref'd insts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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 | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/benchmain.cpp
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index f6bca712f56ef0138233523e5266cde07258a048..b4bb2790bf07dc8b0ddef31a287c344f1d0fe9eb 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -252,6 +252,7 @@ DEFINE_bool(forceBlend, false, "Force alpha blending?");
DEFINE_int32(gpuCacheBytes, -1, "GPU cache size limit in bytes. 0 to disable cache.");
DEFINE_int32(gpuCacheCount, -1, "GPU cache size limit in object count. 0 to disable cache.");
+DEFINE_bool2(leaks, l, false, "show leaked ref cnt'd objects.");
DEFINE_string(match, "", "[~][^]substring[$] [...] of test name to run.\n"
"Multiple matches may be separated by spaces.\n"
"~ causes a matching test to always be skipped\n"
@@ -291,11 +292,13 @@ static bool HasConverged(double prevPerLoop, double currPerLoop, double currRaw)
int tool_main(int argc, char** argv);
int tool_main(int argc, char** argv) {
+ SkCommandLineFlags::Parse(argc, argv);
#if SK_ENABLE_INST_COUNT
- gPrintInstCount = true;
+ if (FLAGS_leaks) {
+ gPrintInstCount = true;
mtklein 2014/01/23 15:24:15 Even, gPrintInstCount = FLAGS_leaks;
+ }
#endif
SkAutoGraphics ag;
- SkCommandLineFlags::Parse(argc, argv);
// First, parse some flags.
SkBenchLogger logger;
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698