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

Side by Side Diff: dm/DM.cpp

Issue 1945353003: Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMJsonWriter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 static SkMutex gFailuresMutex; 107 SK_DECLARE_STATIC_MUTEX(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
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
OLDNEW
« no previous file with comments | « no previous file | dm/DMJsonWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698