| 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 GrTypesPriv_DEFINED | 8 #ifndef GrTypesPriv_DEFINED |
| 9 #define GrTypesPriv_DEFINED | 9 #define GrTypesPriv_DEFINED |
| 10 | 10 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 | 267 |
| 268 /** | 268 /** |
| 269 * Helper class for ensuring that we don't use the wrong locale when building sh
aders. Android | 269 * Helper class for ensuring that we don't use the wrong locale when building sh
aders. Android |
| 270 * doesn't support locale in the NDK, so this is a no-op there. | 270 * doesn't support locale in the NDK, so this is a no-op there. |
| 271 */ | 271 */ |
| 272 #if !defined(SK_BUILD_FOR_ANDROID) | 272 #if !defined(SK_BUILD_FOR_ANDROID) |
| 273 #include <locale.h> | 273 #include <locale.h> |
| 274 #endif | 274 #endif |
| 275 | 275 |
| 276 #if defined(SK_BUILD_FOR_MAC) | 276 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
| 277 #include <xlocale.h> | 277 #include <xlocale.h> |
| 278 #endif | 278 #endif |
| 279 | 279 |
| 280 class GrAutoLocaleSetter { | 280 class GrAutoLocaleSetter { |
| 281 public: | 281 public: |
| 282 GrAutoLocaleSetter (const char* name) { | 282 GrAutoLocaleSetter (const char* name) { |
| 283 #if defined(SK_BUILD_FOR_WIN) | 283 #if defined(SK_BUILD_FOR_WIN) |
| 284 fOldPerThreadLocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); | 284 fOldPerThreadLocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); |
| 285 fOldLocale = setlocale(LC_ALL, name); | 285 fOldLocale = setlocale(LC_ALL, name); |
| 286 #elif !defined(SK_BUILD_FOR_ANDROID) | 286 #elif !defined(SK_BUILD_FOR_ANDROID) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 305 #if defined(SK_BUILD_FOR_WIN) | 305 #if defined(SK_BUILD_FOR_WIN) |
| 306 int fOldPerThreadLocale; | 306 int fOldPerThreadLocale; |
| 307 const char* fOldLocale; | 307 const char* fOldLocale; |
| 308 #elif !defined(SK_BUILD_FOR_ANDROID) | 308 #elif !defined(SK_BUILD_FOR_ANDROID) |
| 309 locale_t fOldLocale; | 309 locale_t fOldLocale; |
| 310 locale_t fLocale; | 310 locale_t fLocale; |
| 311 #endif | 311 #endif |
| 312 }; | 312 }; |
| 313 | 313 |
| 314 #endif | 314 #endif |
| OLD | NEW |