| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2013 Google Inc. | 2  * Copyright 2013 Google Inc. | 
| 3  * | 3  * | 
| 4  * Use of this source code is governed by a BSD-style license that can be | 4  * Use of this source code is governed by a BSD-style license that can be | 
| 5  * found in the LICENSE file. | 5  * found in the LICENSE file. | 
| 6  */ | 6  */ | 
| 7 | 7 | 
| 8 #include "CrashHandler.h" | 8 #include "CrashHandler.h" | 
| 9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" | 
| 10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97     if (!FLAGS_quiet) { | 97     if (!FLAGS_quiet) { | 
| 98         printf(fmt, args...); | 98         printf(fmt, args...); | 
| 99     } | 99     } | 
| 100 } | 100 } | 
| 101 static void info(const char* fmt) { | 101 static void info(const char* fmt) { | 
| 102     if (!FLAGS_quiet) { | 102     if (!FLAGS_quiet) { | 
| 103         printf("%s", fmt);  // Clang warns printf(fmt) is insecure. | 103         printf("%s", fmt);  // Clang warns printf(fmt) is insecure. | 
| 104     } | 104     } | 
| 105 } | 105 } | 
| 106 | 106 | 
| 107 SK_DECLARE_STATIC_MUTEX(gFailuresMutex); | 107 static SkMutex gFailuresMutex; | 
| 108 static SkTArray<SkString> gFailures; | 108 static SkTArray<SkString> gFailures; | 
| 109 | 109 | 
| 110 static void fail(const SkString& err) { | 110 static void fail(const SkString& err) { | 
| 111     SkAutoMutexAcquire lock(gFailuresMutex); | 111     SkAutoMutexAcquire lock(gFailuresMutex); | 
| 112     SkDebugf("\n\nFAILURE: %s\n\n", err.c_str()); | 112     SkDebugf("\n\nFAILURE: %s\n\n", err.c_str()); | 
| 113     gFailures.push_back(err); | 113     gFailures.push_back(err); | 
| 114 } | 114 } | 
| 115 | 115 | 
| 116 | 116 | 
| 117 // We use a spinlock to make locking this in a signal handler _somewhat_ safe. | 117 // We use a spinlock to make locking this in a signal handler _somewhat_ safe. | 
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1443 #endif | 1443 #endif | 
| 1444 } | 1444 } | 
| 1445 } // namespace skiatest | 1445 } // namespace skiatest | 
| 1446 | 1446 | 
| 1447 #if !defined(SK_BUILD_FOR_IOS) | 1447 #if !defined(SK_BUILD_FOR_IOS) | 
| 1448 int main(int argc, char** argv) { | 1448 int main(int argc, char** argv) { | 
| 1449     SkCommandLineFlags::Parse(argc, argv); | 1449     SkCommandLineFlags::Parse(argc, argv); | 
| 1450     return dm_main(); | 1450     return dm_main(); | 
| 1451 } | 1451 } | 
| 1452 #endif | 1452 #endif | 
| OLD | NEW | 
|---|