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

Unified Diff: gm/gmmain.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
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 3b7e76a757145198ea5ffb947a21f0c5198a11f8..86d96fe2885d76339b315a90403dddeac8d6c651 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -1430,6 +1430,7 @@ DEFINE_string(ignoreErrorTypes, kDefaultIgnorableErrorTypes.asString(" ").c_str(
DEFINE_string(ignoreFailuresFile, "", "Path to file containing a list of tests for which we "
"should ignore failures.\n"
"The file should list one test per line, except for comment lines starting with #");
+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"
@@ -2198,8 +2199,15 @@ static bool parse_flags_jpeg_quality() {
int tool_main(int argc, char** argv);
int tool_main(int argc, char** argv) {
+ SkString usage;
+ usage.printf("Run the golden master tests.\n");
+ SkCommandLineFlags::SetUsage(usage.c_str());
+ SkCommandLineFlags::Parse(argc, argv);
+
#if SK_ENABLE_INST_COUNT
- gPrintInstCount = true;
+ if (FLAGS_leaks) {
+ gPrintInstCount = true;
+ }
#endif
SkGraphics::Init();
@@ -2209,11 +2217,6 @@ int tool_main(int argc, char** argv) {
setSystemPreferences();
GMMain gmmain;
- SkString usage;
- usage.printf("Run the golden master tests.\n");
- SkCommandLineFlags::SetUsage(usage.c_str());
- SkCommandLineFlags::Parse(argc, argv);
-
SkTDArray<size_t> configs;
int moduloRemainder = -1;
« bench/benchmain.cpp ('K') | « bench/benchmain.cpp ('k') | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698