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

Unified Diff: tests/skia_test.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
« bench/benchmain.cpp ('K') | « gm/gmmain.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index 26a7701a8def4c4e11ec81ff628bd858351cbf6a..d489972574f4a3e99742e8843ba40c4b267dd3cd 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -32,6 +32,7 @@ DEFINE_string2(match, m, NULL, "[~][^]substring[$] [...] of test name to run.\n"
DEFINE_string2(tmpDir, t, NULL, "tmp directory for tests to use.");
DEFINE_string2(resourcePath, i, "resources", "directory for test resources.");
DEFINE_bool2(extendedTest, x, false, "run extended tests for pathOps.");
+DEFINE_bool2(leaks, l, false, "show leaked ref cnt'd objects.");
DEFINE_bool2(single, z, false, "run tests on a single thread internally.");
DEFINE_bool2(verbose, v, false, "enable verbose output.");
DEFINE_int32(threads, SkThreadPool::kThreadPerCore,
@@ -129,7 +130,9 @@ int tool_main(int argc, char** argv) {
SkCommandLineFlags::Parse(argc, argv);
#if SK_ENABLE_INST_COUNT
- gPrintInstCount = true;
+ if (FLAGS_leaks) {
+ gPrintInstCount = true;
+ }
#endif
SkGraphics::Init();
« bench/benchmain.cpp ('K') | « gm/gmmain.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698