| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef SkMutex_pthread_DEFINED | 8 #ifndef SkMutex_pthread_DEFINED |
| 9 #define SkMutex_pthread_DEFINED | 9 #define SkMutex_pthread_DEFINED |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // | 87 // |
| 88 // Without magic statics there are no thread safety guarantees on initialization | 88 // Without magic statics there are no thread safety guarantees on initialization |
| 89 // of local statics (even POD). As a result, it is illegal to use | 89 // of local statics (even POD). As a result, it is illegal to use |
| 90 // SK_DECLARE_STATIC_MUTEX in a function. | 90 // SK_DECLARE_STATIC_MUTEX in a function. |
| 91 // | 91 // |
| 92 // Because SkBaseMutex is not a primitive, a static SkBaseMutex cannot be | 92 // Because SkBaseMutex is not a primitive, a static SkBaseMutex cannot be |
| 93 // initialized in a class with this macro. | 93 // initialized in a class with this macro. |
| 94 #define SK_DECLARE_STATIC_MUTEX(name) namespace {} static SkBaseMutex name = SK_
BASE_MUTEX_INIT | 94 #define SK_DECLARE_STATIC_MUTEX(name) namespace {} static SkBaseMutex name = SK_
BASE_MUTEX_INIT |
| 95 | 95 |
| 96 #endif | 96 #endif |
| OLD | NEW |