| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 #else | 289 #else |
| 290 (void) name; // suppress unused param warning. | 290 (void) name; // suppress unused param warning. |
| 291 #endif | 291 #endif |
| 292 } | 292 } |
| 293 | 293 |
| 294 ~GrAutoLocaleSetter () { | 294 ~GrAutoLocaleSetter () { |
| 295 #if defined(SK_BUILD_FOR_WIN) | 295 #if defined(SK_BUILD_FOR_WIN) |
| 296 setlocale(LC_ALL, fOldLocale); | 296 setlocale(LC_ALL, fOldLocale); |
| 297 _configthreadlocale(fOldPerThreadLocale); | 297 _configthreadlocale(fOldPerThreadLocale); |
| 298 #elif !defined(SK_BUILD_FOR_ANDROID) | 298 #elif !defined(SK_BUILD_FOR_ANDROID) |
| 299 SkASSERT(uselocale(fOldLocale) == fLocale); | 299 uselocale(fOldLocale); |
| 300 freelocale(fLocale); | 300 freelocale(fLocale); |
| 301 #endif | 301 #endif |
| 302 } | 302 } |
| 303 | 303 |
| 304 private: | 304 private: |
| 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 |