projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd3e8cb
)
Use SK_DECLARE_STATIC_MUTEX for global mutex.
author
mtklein
<mtklein@chromium.org>
Mon, 13 Jul 2015 13:15:36 +0000
(06:15 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Mon, 13 Jul 2015 13:15:36 +0000
(06:15 -0700)
This initializes the mutex at link time on non-Windows platforms,
rather than at pre-main-runtime like `static SkMutex gFoo;`
BUG=skia:
Review URL: https://codereview.chromium.org/
1226403007
src/ports/SkFontHost_mac.cpp
patch
|
blob
|
history
diff --git
a/src/ports/SkFontHost_mac.cpp
b/src/ports/SkFontHost_mac.cpp
index
bfacb07
..
b55aa35
100755
(executable)
--- a/
src/ports/SkFontHost_mac.cpp
+++ b/
src/ports/SkFontHost_mac.cpp
@@
-53,7
+53,7
@@
#define USE_GLOBAL_MUTEX_FOR_CG_ACCESS
#ifdef USE_GLOBAL_MUTEX_FOR_CG_ACCESS
-
static SkMutex gCGMutex
;
+
SK_DECLARE_STATIC_MUTEX(gCGMutex)
;
#define AUTO_CG_LOCK() SkAutoMutexAcquire amc(gCGMutex)
#else
#define AUTO_CG_LOCK()