Use SK_DECLARE_STATIC_MUTEX for global mutex.
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
This commit is contained in:
parent
bd3e8cb42c
commit
4598fc3c12
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user