diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 4e95c69f32..a47225db11 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -14,6 +14,12 @@ #include "SkPostConfig.h" #include #include + +#if defined(SK_ARM_HAS_NEON) + #include +#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 + #include +#endif // IWYU pragma: end_exports #include diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h index a7aa50cf9f..6ed6144d18 100644 --- a/include/private/SkFloatingPoint.h +++ b/include/private/SkFloatingPoint.h @@ -15,12 +15,6 @@ #include #include -#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 - #include -#elif defined(SK_ARM_HAS_NEON) - #include -#endif - // For _POSIX_VERSION #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) #include diff --git a/src/opts/SkBlurImageFilter_opts.h b/src/opts/SkBlurImageFilter_opts.h index f62604ca08..8d22391b5f 100644 --- a/src/opts/SkBlurImageFilter_opts.h +++ b/src/opts/SkBlurImageFilter_opts.h @@ -11,10 +11,6 @@ #include "SkColorPriv.h" #include "SkTypes.h" -#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 - #include -#endif - namespace SK_OPTS_NS { enum class BlurDirection { kX, kY }; diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h index 063b99f89a..66f8074e40 100644 --- a/src/opts/SkNx_neon.h +++ b/src/opts/SkNx_neon.h @@ -8,8 +8,6 @@ #ifndef SkNx_neon_DEFINED #define SkNx_neon_DEFINED -#include - #define SKNX_IS_FAST // ARMv8 has vrndmq_f32 to floor 4 floats. Here we emulate it: diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h index 0b22a5a3c6..1fc235d99b 100644 --- a/src/opts/SkNx_sse.h +++ b/src/opts/SkNx_sse.h @@ -9,7 +9,6 @@ #define SkNx_sse_DEFINED #include "SkCpu.h" -#include // This file may assume <= SSE2, but must check SK_CPU_SSE_LEVEL for anything more recent. // If you do, make sure this is in a static inline function... anywhere else risks violating ODR. diff --git a/src/opts/SkSwizzler_opts.h b/src/opts/SkSwizzler_opts.h index a22e145020..15eec3a355 100644 --- a/src/opts/SkSwizzler_opts.h +++ b/src/opts/SkSwizzler_opts.h @@ -10,12 +10,6 @@ #include "SkColorPriv.h" -#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 - #include -#elif defined(SK_ARM_HAS_NEON) - #include -#endif - namespace SK_OPTS_NS { static void RGBA_to_rgbA_portable(uint32_t* dst, const void* vsrc, int count) {