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

Side by Side Diff: dm/DMJsonWriter.cpp

Issue 1214603003: Revert of Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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') | gyp/core.gypi » ('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"
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
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
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | gyp/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698