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/qpixmap_raster.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/qpixmap_raster.cpp')
-rw-r--r-- | src/gui/image/qpixmap_raster.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index 27f472d842..260deb4482 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -182,7 +182,7 @@ void QRasterPlatformPixmap::fill(const QColor &color) if (alpha != 255) { if (!image.hasAlphaChannel()) { QImage::Format toFormat; -#if !(defined(QT_HAVE_NEON) || defined(QT_ALWAYS_HAVE_SSE2)) +#if !(defined(QT_COMPILER_SUPPORTS_NEON) || defined(__SSE2__)) if (image.format() == QImage::Format_RGB16) toFormat = QImage::Format_ARGB8565_Premultiplied; else if (image.format() == QImage::Format_RGB666) @@ -303,7 +303,7 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC QImage::Format opaqueFormat = QNativeImage::systemFormat(); QImage::Format alphaFormat = QImage::Format_ARGB32_Premultiplied; -#if !defined(QT_HAVE_NEON) && !defined(QT_ALWAYS_HAVE_SSE2) +#if !defined(QT_COMPILER_SUPPORTS_NEON) && !defined(__SSE2__) switch (opaqueFormat) { case QImage::Format_RGB16: alphaFormat = QImage::Format_ARGB8565_Premultiplied; |