OLD | NEW |
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" | |
15 #include "SkOSFile.h" | 14 #include "SkOSFile.h" |
16 #include "SkStream.h" | 15 #include "SkStream.h" |
17 #include "SkTArray.h" | 16 #include "SkTArray.h" |
| 17 #include "SkThread.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 SK_DECLARE_STATIC_MUTEX(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 } |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 if (!r["key"]["source_options"].isNull()) { | 119 if (!r["key"]["source_options"].isNull()) { |
120 br.sourceOptions = r["key"]["source_options"].asCString(); | 120 br.sourceOptions = r["key"]["source_options"].asCString(); |
121 } | 121 } |
122 callback(br); | 122 callback(br); |
123 } | 123 } |
124 return true; | 124 return true; |
125 } | 125 } |
126 | 126 |
127 } // namespace DM | 127 } // namespace DM |
OLD | NEW |