| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 // IWYU pragma: private, include "SkTypes.h" | 8 // IWYU pragma: private, include "SkTypes.h" |
| 9 | 9 |
| 10 #ifndef SkPostConfig_DEFINED | 10 #ifndef SkPostConfig_DEFINED |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 * SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined | 260 * SK_ALWAYS_INLINE void someMethod() { ... } // should always be inlined |
| 261 */ | 261 */ |
| 262 #if !defined(SK_ALWAYS_INLINE) | 262 #if !defined(SK_ALWAYS_INLINE) |
| 263 # if defined(SK_BUILD_FOR_WIN) | 263 # if defined(SK_BUILD_FOR_WIN) |
| 264 # define SK_ALWAYS_INLINE __forceinline | 264 # define SK_ALWAYS_INLINE __forceinline |
| 265 # else | 265 # else |
| 266 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline | 266 # define SK_ALWAYS_INLINE SK_ATTRIBUTE(always_inline) inline |
| 267 # endif | 267 # endif |
| 268 #endif | 268 #endif |
| 269 | 269 |
| 270 /** |
| 271 * If your judgment is better than the compiler's (i.e. you've profiled it), |
| 272 * you can use SK_NEVER_INLINE to prevent inlining. |
| 273 */ |
| 274 #if !defined(SK_NEVER_INLINE) |
| 275 # if defined(SK_BUILD_FOR_WIN) |
| 276 # define SK_NEVER_INLINE __declspec(noinline) |
| 277 # else |
| 278 # define SK_NEVER_INLINE SK_ATTRIBUTE(noinline) |
| 279 # endif |
| 280 #endif |
| 281 |
| 270 ////////////////////////////////////////////////////////////////////// | 282 ////////////////////////////////////////////////////////////////////// |
| 271 | 283 |
| 272 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 | 284 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 |
| 273 #define SK_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) | 285 #define SK_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) |
| 274 #define SK_WRITE_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) | 286 #define SK_WRITE_PREFETCH(ptr) _mm_prefetch(reinterpret_cast<const char*>(pt
r), _MM_HINT_T0) |
| 275 #elif defined(__GNUC__) | 287 #elif defined(__GNUC__) |
| 276 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) | 288 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr) |
| 277 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) | 289 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) |
| 278 #else | 290 #else |
| 279 #define SK_PREFETCH(ptr) | 291 #define SK_PREFETCH(ptr) |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 350 |
| 339 #ifndef SK_HISTOGRAM_BOOLEAN | 351 #ifndef SK_HISTOGRAM_BOOLEAN |
| 340 # define SK_HISTOGRAM_BOOLEAN(name, value) | 352 # define SK_HISTOGRAM_BOOLEAN(name, value) |
| 341 #endif | 353 #endif |
| 342 | 354 |
| 343 #ifndef SK_HISTOGRAM_ENUMERATION | 355 #ifndef SK_HISTOGRAM_ENUMERATION |
| 344 # define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value) | 356 # define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value) |
| 345 #endif | 357 #endif |
| 346 | 358 |
| 347 #endif // SkPostConfig_DEFINED | 359 #endif // SkPostConfig_DEFINED |
| OLD | NEW |