DM: wire up --leaks / -l again

No public API changes.
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/893043002
This commit is contained in:
mtklein 2015-02-02 13:24:37 -08:00 committed by Commit bot
parent 37f9a2694c
commit e67164d9b3
3 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,7 @@
#include "SkCommonFlags.h"
#include "SkForceLinking.h"
#include "SkGraphics.h"
#include "SkInstCnt.h"
#include "SkMD5.h"
#include "SkOSFile.h"
#include "SkTDynamicHash.h"
@ -490,6 +491,9 @@ int dm_main() {
SetupCrashHandler();
SkAutoGraphics ag;
SkTaskGroup::Enabler enabled(FLAGS_threads);
if (FLAGS_leaks) {
SkInstCountPrintLeaksOnExit();
}
gather_gold();

View File

@ -77,4 +77,6 @@
#define SK_DECLARE_INST_COUNT(T)
#endif
void SkInstCountPrintLeaksOnExit();
#endif // SkInstCnt_DEFINED

View File

@ -9,4 +9,7 @@
#if SK_ENABLE_INST_COUNT && !defined(SKIA_DLL) // See SkInstCnt.h
bool gPrintInstCount = false;
void SkInstCountPrintLeaksOnExit() { gPrintInstCount = true; }
#else
void SkInstCountPrintLeaksOnExit() {}
#endif