| 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 #include "SkTypes.h" | 7 #include "SkTypes.h" |
| 8 #if defined(SK_BUILD_FOR_WIN32) | 8 #if defined(SK_BUILD_FOR_WIN32) |
| 9 | 9 |
| 10 #include "SkLeanWindows.h" |
| 11 #include "SkMutex.h" |
| 10 #include "SkTLS.h" | 12 #include "SkTLS.h" |
| 11 #include "SkMutex.h" | |
| 12 | 13 |
| 13 static bool gOnce = false; | 14 static bool gOnce = false; |
| 14 static DWORD gTlsIndex; | 15 static DWORD gTlsIndex; |
| 15 SK_DECLARE_STATIC_MUTEX(gMutex); | 16 SK_DECLARE_STATIC_MUTEX(gMutex); |
| 16 | 17 |
| 17 void* SkTLS::PlatformGetSpecific(bool forceCreateTheSlot) { | 18 void* SkTLS::PlatformGetSpecific(bool forceCreateTheSlot) { |
| 18 if (!forceCreateTheSlot && !gOnce) { | 19 if (!forceCreateTheSlot && !gOnce) { |
| 19 return nullptr; | 20 return nullptr; |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #else | 71 #else |
| 71 | 72 |
| 72 #pragma data_seg(".CRT$XLB") | 73 #pragma data_seg(".CRT$XLB") |
| 73 PIMAGE_TLS_CALLBACK skia_tls_callback = onTLSCallback; | 74 PIMAGE_TLS_CALLBACK skia_tls_callback = onTLSCallback; |
| 74 #pragma data_seg() | 75 #pragma data_seg() |
| 75 | 76 |
| 76 #endif | 77 #endif |
| 77 } | 78 } |
| 78 | 79 |
| 79 #endif//defined(SK_BUILD_FOR_WIN32) | 80 #endif//defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |