| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkPostConfig_DEFINED | 10 #ifndef SkPostConfig_DEFINED |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 #if !defined(SK_UNUSED) | 373 #if !defined(SK_UNUSED) |
| 374 #define SK_UNUSED SK_ATTRIBUTE(unused) | 374 #define SK_UNUSED SK_ATTRIBUTE(unused) |
| 375 #endif | 375 #endif |
| 376 | 376 |
| 377 #if !defined(SK_ATTR_DEPRECATED) | 377 #if !defined(SK_ATTR_DEPRECATED) |
| 378 // we ignore msg for now... | 378 // we ignore msg for now... |
| 379 #define SK_ATTR_DEPRECATED(msg) SK_ATTRIBUTE(deprecated) | 379 #define SK_ATTR_DEPRECATED(msg) SK_ATTRIBUTE(deprecated) |
| 380 #endif | 380 #endif |
| 381 | 381 |
| 382 // If your judgment is better than the compiler's (i.e. you've profiled it), |
| 383 // you can use SK_ALWAYS_INLINE to force inlining. E.g. |
| 384 // inline void someMethod() { ... } // may not be inlined |
| 385 // SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined |
| 386 #if !defined(SK_ALWAYS_INLINE) |
| 387 # if defined(SK_BUILD_FOR_WIN) |
| 388 # define SK_ALWAYS_INLINE __forceinline |
| 389 # else |
| 390 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline |
| 391 # endif |
| 392 #endif |
| 393 |
| 382 ////////////////////////////////////////////////////////////////////// | 394 ////////////////////////////////////////////////////////////////////// |
| 383 | 395 |
| 384 #if defined(__clang__) || defined(__GNUC__) | 396 #if defined(__clang__) || defined(__GNUC__) |
| 385 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) | 397 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) |
| 386 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) | 398 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) |
| 387 #else | 399 #else |
| 388 #define SK_PREFETCH(ptr) | 400 #define SK_PREFETCH(ptr) |
| 389 #define SK_WRITE_PREFETCH(ptr) | 401 #define SK_WRITE_PREFETCH(ptr) |
| 390 #endif | 402 #endif |
| 391 | 403 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 406 #else | 418 #else |
| 407 #define SK_SIZE_T_SPECIFIER "%zu" | 419 #define SK_SIZE_T_SPECIFIER "%zu" |
| 408 #endif | 420 #endif |
| 409 #endif | 421 #endif |
| 410 | 422 |
| 411 ////////////////////////////////////////////////////////////////////// | 423 ////////////////////////////////////////////////////////////////////// |
| 412 | 424 |
| 413 #ifndef SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 425 #ifndef SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
| 414 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 1 | 426 #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 1 |
| 415 #endif | 427 #endif |
| OLD | NEW |