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

Side by Side Diff: dm/DMJsonWriter.cpp

Issue 1948193002: 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 | « dm/DM.cpp ('k') | include/private/SkMutex.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 "DMJsonWriter.h" 8 #include "DMJsonWriter.h"
9 9
10 #include "ProcStats.h" 10 #include "ProcStats.h"
11 #include "SkCommonFlags.h" 11 #include "SkCommonFlags.h"
12 #include "SkData.h" 12 #include "SkData.h"
13 #include "SkJSONCPP.h" 13 #include "SkJSONCPP.h"
14 #include "SkMutex.h" 14 #include "SkMutex.h"
15 #include "SkOSFile.h" 15 #include "SkOSFile.h"
16 #include "SkStream.h" 16 #include "SkStream.h"
17 #include "SkTArray.h" 17 #include "SkTArray.h"
18 18
19 namespace DM { 19 namespace DM {
20 20
21 SkTArray<JsonWriter::BitmapResult> gBitmapResults; 21 SkTArray<JsonWriter::BitmapResult> gBitmapResults;
22 SK_DECLARE_STATIC_MUTEX(gBitmapResultLock); 22 static SkMutex gBitmapResultLock;
23 23
24 void JsonWriter::AddBitmapResult(const BitmapResult& result) { 24 void JsonWriter::AddBitmapResult(const BitmapResult& result) {
25 SkAutoMutexAcquire lock(&gBitmapResultLock); 25 SkAutoMutexAcquire lock(&gBitmapResultLock);
26 gBitmapResults.push_back(result); 26 gBitmapResults.push_back(result);
27 } 27 }
28 28
29 SkTArray<skiatest::Failure> gFailures; 29 SkTArray<skiatest::Failure> gFailures;
30 SK_DECLARE_STATIC_MUTEX(gFailureLock); 30 static SkMutex gFailureLock;
31 31
32 void JsonWriter::AddTestFailure(const skiatest::Failure& failure) { 32 void JsonWriter::AddTestFailure(const skiatest::Failure& failure) {
33 SkAutoMutexAcquire lock(gFailureLock); 33 SkAutoMutexAcquire lock(gFailureLock);
34 gFailures.push_back(failure); 34 gFailures.push_back(failure);
35 } 35 }
36 36
37 void JsonWriter::DumpJson() { 37 void JsonWriter::DumpJson() {
38 if (FLAGS_writePath.isEmpty()) { 38 if (FLAGS_writePath.isEmpty()) {
39 return; 39 return;
40 } 40 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 if (!r["key"]["source_options"].isNull()) { 121 if (!r["key"]["source_options"].isNull()) {
122 br.sourceOptions = r["key"]["source_options"].asCString(); 122 br.sourceOptions = r["key"]["source_options"].asCString();
123 } 123 }
124 callback(br); 124 callback(br);
125 } 125 }
126 return true; 126 return true;
127 } 127 }
128 128
129 } // namespace DM 129 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | include/private/SkMutex.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698