diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-09 10:46:43 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-09 10:46:43 (GMT) |
commit | 0de5087cf17e1c1c37da166b2f531525b9060d71 (patch) | |
tree | 138a0312bcf5dedc57b51387437cd5c94862f15c /src/gui/image/qimage.cpp | |
parent | 75c5bc5f7efd5f7055b689a244147e69733280a4 (diff) | |
parent | 83e3f716c795a8be0a6e5d6aa4d6ff51a994cae1 (diff) | |
download | Qt-0de5087cf17e1c1c37da166b2f531525b9060d71.zip Qt-0de5087cf17e1c1c37da166b2f531525b9060d71.tar.gz Qt-0de5087cf17e1c1c37da166b2f531525b9060d71.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix qdoc warning.
Fix subfocus when reparenting panels.
Add three new style-hints to QFont to match CSS' generic font families
The forward declaration should have been in the namespace for QImageData
Fixes the sqlite driver bug QTBUG-11904 (pointer aliasing)
Add test and fix style for the SSE2 implementation of ARGB32 conversion
Build fix, the header of QImageData did not declare QImageWriter.
SSE2 implementation of convert_ARGB_to_ARGB_PM_inplace for QImage
Moved primitive SSE2 painting utilities to qdrawingprimitive_sse2_p.h
Move logic for building SIMD extensions to gui.pro
Fix text drawing into alpha pixmap with opengl engine
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 79f266d..e5930ac 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -58,6 +58,7 @@ #include <private/qmemrotate_p.h> #include <private/qpixmapdata_p.h> #include <private/qimagescale_p.h> +#include <private/qsimd_p.h> #include <qhash.h> @@ -209,7 +210,7 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format, int nu break; } - const int bytes_per_line = ((width * depth + 31) >> 5) << 2; // bytes per scanline (must be multiple of 8) + const int bytes_per_line = ((width * depth + 31) >> 5) << 2; // bytes per scanline (must be multiple of 4) // sanity check for potential overflows if (INT_MAX/depth < width @@ -3630,7 +3631,7 @@ static const Image_Converter converter_map[QImage::NImageFormats][QImage::NImage } // Format_ARGB4444_Premultiplied }; -static const InPlace_Image_Converter inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats] = +static InPlace_Image_Converter inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -3727,6 +3728,19 @@ static const InPlace_Image_Converter inplace_converter_map[QImage::NImageFormats } // Format_ARGB4444_Premultiplied }; +void qInitImageConversions() +{ + const uint features = qDetectCPUFeatures(); + Q_UNUSED(features); + +#ifdef QT_HAVE_SSE2 + 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; + } +#endif +} + /*! Returns a copy of the image in the given \a format. |