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 #ifndef SkTypes_DEFINED | 8 #ifndef SkTypes_DEFINED |
9 #define SkTypes_DEFINED | 9 #define SkTypes_DEFINED |
10 | 10 |
11 // IWYU pragma: begin_exports | 11 // IWYU pragma: begin_exports |
12 #include "SkPreConfig.h" | 12 #include "SkPreConfig.h" |
13 #include "SkUserConfig.h" | 13 #include "SkUserConfig.h" |
14 #include "SkPostConfig.h" | 14 #include "SkPostConfig.h" |
15 #include <stddef.h> | 15 #include <stddef.h> |
16 #include <stdint.h> | 16 #include <stdint.h> |
| 17 |
| 18 #if defined(SK_ARM_HAS_NEON) |
| 19 #include <arm_neon.h> |
| 20 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
| 21 #include <immintrin.h> |
| 22 #endif |
17 // IWYU pragma: end_exports | 23 // IWYU pragma: end_exports |
18 | 24 |
19 #include <string.h> | 25 #include <string.h> |
20 | 26 |
21 /** | 27 /** |
22 * sk_careful_memcpy() is just like memcpy(), but guards against undefined beha
vior. | 28 * sk_careful_memcpy() is just like memcpy(), but guards against undefined beha
vior. |
23 * | 29 * |
24 * It is undefined behavior to call memcpy() with null dst or src, even if len i
s 0. | 30 * It is undefined behavior to call memcpy() with null dst or src, even if len i
s 0. |
25 * If an optimizer is "smart" enough, it can exploit this to do unexpected thing
s. | 31 * If an optimizer is "smart" enough, it can exploit this to do unexpected thing
s. |
26 * memcpy(dst, src, 0); | 32 * memcpy(dst, src, 0); |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 | 705 |
700 void* fPtr; | 706 void* fPtr; |
701 size_t fSize; // can be larger than the requested size (see kReuse) | 707 size_t fSize; // can be larger than the requested size (see kReuse) |
702 uint32_t fStorage[kSize >> 2]; | 708 uint32_t fStorage[kSize >> 2]; |
703 }; | 709 }; |
704 // Can't guard the constructor because it's a template class. | 710 // Can't guard the constructor because it's a template class. |
705 | 711 |
706 #endif /* C++ */ | 712 #endif /* C++ */ |
707 | 713 |
708 #endif | 714 #endif |
OLD | NEW |