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:
parent
37f9a2694c
commit
e67164d9b3
@ -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();
|
||||
|
||||
|
@ -77,4 +77,6 @@
|
||||
#define SK_DECLARE_INST_COUNT(T)
|
||||
#endif
|
||||
|
||||
void SkInstCountPrintLeaksOnExit();
|
||||
|
||||
#endif // SkInstCnt_DEFINED
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user