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

Side by Side Diff: src/ports/SkFontHost_fontconfig.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 | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_mac.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 2008 Google Inc. 2 * Copyright 2008 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 "SkFontConfigInterface.h" 8 #include "SkFontConfigInterface.h"
9 #include "SkFontMgr.h" 9 #include "SkFontMgr.h"
10 #include "SkMutex.h" 10 #include "SkMutex.h"
11 #include "SkRefCnt.h" 11 #include "SkRefCnt.h"
12 12
13 static SkMutex gFontConfigInterfaceMutex; 13 SK_DECLARE_STATIC_MUTEX(gFontConfigInterfaceMutex);
14 static SkFontConfigInterface* gFontConfigInterface; 14 static SkFontConfigInterface* gFontConfigInterface;
15 15
16 SkFontConfigInterface* SkFontConfigInterface::RefGlobal() { 16 SkFontConfigInterface* SkFontConfigInterface::RefGlobal() {
17 SkAutoMutexAcquire ac(gFontConfigInterfaceMutex); 17 SkAutoMutexAcquire ac(gFontConfigInterfaceMutex);
18 18
19 return SkSafeRef(gFontConfigInterface); 19 return SkSafeRef(gFontConfigInterface);
20 } 20 }
21 21
22 SkFontConfigInterface* SkFontConfigInterface::SetGlobal(SkFontConfigInterface* f c) { 22 SkFontConfigInterface* SkFontConfigInterface::SetGlobal(SkFontConfigInterface* f c) {
23 SkAutoMutexAcquire ac(gFontConfigInterfaceMutex); 23 SkAutoMutexAcquire ac(gFontConfigInterfaceMutex);
(...skipping 11 matching lines...) Expand all
35 return SkRef(gFontConfigInterface); 35 return SkRef(gFontConfigInterface);
36 } 36 }
37 gFontConfigInterface = SkRef(SkFontConfigInterface::GetSingletonDirectInterf ace()); 37 gFontConfigInterface = SkRef(SkFontConfigInterface::GetSingletonDirectInterf ace());
38 return gFontConfigInterface; 38 return gFontConfigInterface;
39 } 39 }
40 40
41 SkFontMgr* SkFontMgr::Factory() { 41 SkFontMgr* SkFontMgr::Factory() {
42 SkFontConfigInterface* fci = init_FCI(); 42 SkFontConfigInterface* fci = init_FCI();
43 return fci ? SkFontMgr_New_FCI(fci) : nullptr; 43 return fci ? SkFontMgr_New_FCI(fci) : nullptr;
44 } 44 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698