Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: src/core/SkSharedMutex.h

Issue 2045633002: Move immintrin/arm_neon includes to where they are used. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: check for libc++ Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/private/SkFloatingPoint.h ('k') | src/opts/SkBlurImageFilter_opts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSharedMutex.h
diff --git a/src/core/SkSharedMutex.h b/src/core/SkSharedMutex.h
index 21c9f46d64058f28e4d1273d5b40095340a8a4dd..302940bbc402cf84002f8c740b395a3ff0b347c9 100644
--- a/src/core/SkSharedMutex.h
+++ b/src/core/SkSharedMutex.h
@@ -14,6 +14,18 @@
#ifdef SK_DEBUG
#include "SkMutex.h"
+
+ // On GCC 4.8, targeting ARMv7 with NEON, using libc++, we need to typedef float float32_t,
+ // (or include <arm_neon.h> which does that) before #including <memory> here.
+ // This makes no sense. I'm not very interested in understanding why... this is an old,
+ // bizarre platform configuration that we should just let die.
+ #include <ciso646> // Include something innocuous to define _LIBCPP_VERISON if it's libc++.
+ #if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 8 \
+ && defined(SK_CPU_ARM32) && defined(SK_ARM_HAS_NEON) \
+ && defined(_LIBCPP_VERSION)
+ typedef float float32_t;
+ #endif
+
#include <memory>
#endif // SK_DEBUG
« no previous file with comments | « include/private/SkFloatingPoint.h ('k') | src/opts/SkBlurImageFilter_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698