diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-30 14:38:16 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-31 17:55:37 +0200 |
commit | 398c8513b172d4605a27dfa6125045b55e7cb29e (patch) | |
tree | b5997e08351873452745f8b20f22558d66710e40 /src/gui/image/qimage.cpp | |
parent | 5cbdba588a14e05fd282b5850a3e7b66fd9b2b65 (diff) |
Overhaul the qsimd_p.h: rename macros and update conditionals
The QT_HAVE_xxx macros are replaced with QT_COMPILER_SUPPORTS_xxx.
They indicate that the compiler supports those intrinsics, but not
necessarily that they can be used right now.
ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all
uses of the intrinsics are either in specially-built files, protected
by runtime checks, or they are unconditional (qstring.cpp). So we only
use the intrinsics when the compiler was instructed to generate code
for that instruction set anyway.
Change-Id: Ie58eebbc0518ad1d5420a85174fd84153bb9abaa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 2d70b28923..91af774eef 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -3272,8 +3272,8 @@ void qInitImageConversions() const uint features = qDetectCPUFeatures(); Q_UNUSED(features); -#ifdef QT_HAVE_SSE2 -#ifdef QT_HAVE_AVX +#ifdef QT_COMPILER_SUPPORTS_SSE2 +#ifdef QT_COMPILER_SUPPORTS_AVX if (features & AVX) { extern bool convert_ARGB_to_ARGB_PM_inplace_avx(QImageData *data, Qt::ImageConversionFlags); inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_avx; @@ -3288,7 +3288,7 @@ void qInitImageConversions() if (features & SSE2) { extern bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionFlags); inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_sse2; -#ifdef QT_HAVE_SSSE3 +#ifdef QT_COMPILER_SUPPORTS_SSSE3 if (features & SSSE3) { extern void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags); converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_ssse3; @@ -3299,7 +3299,7 @@ void qInitImageConversions() } #endif // SSE2 -#ifdef QT_HAVE_NEON +#ifdef QT_COMPILER_SUPPORTS_NEON if (features & NEON) { extern void convert_RGB888_to_RGB32_neon(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags); converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_neon; |