| 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 #include "SkTLS.h" | 8 #include "SkTLS.h" |
| 9 #include "SkMutex.h" | 9 #include "SkThread.h" |
| 10 | 10 |
| 11 static bool gOnce = false; | 11 static bool gOnce = false; |
| 12 static DWORD gTlsIndex; | 12 static DWORD gTlsIndex; |
| 13 SK_DECLARE_STATIC_MUTEX(gMutex); | 13 SK_DECLARE_STATIC_MUTEX(gMutex); |
| 14 | 14 |
| 15 void* SkTLS::PlatformGetSpecific(bool forceCreateTheSlot) { | 15 void* SkTLS::PlatformGetSpecific(bool forceCreateTheSlot) { |
| 16 if (!forceCreateTheSlot && !gOnce) { | 16 if (!forceCreateTheSlot && !gOnce) { |
| 17 return NULL; | 17 return NULL; |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #pragma const_seg() | 66 #pragma const_seg() |
| 67 | 67 |
| 68 #else | 68 #else |
| 69 | 69 |
| 70 #pragma data_seg(".CRT$XLB") | 70 #pragma data_seg(".CRT$XLB") |
| 71 PIMAGE_TLS_CALLBACK skia_tls_callback = onTLSCallback; | 71 PIMAGE_TLS_CALLBACK skia_tls_callback = onTLSCallback; |
| 72 #pragma data_seg() | 72 #pragma data_seg() |
| 73 | 73 |
| 74 #endif | 74 #endif |
| 75 } | 75 } |
| OLD | NEW |