summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap_raster.cpp')
-rw-r--r--src/gui/image/qpixmap_raster.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index f9a017c281..37259adcd2 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -135,11 +135,16 @@ bool QRasterPlatformPixmap::fromData(const uchar *buffer, uint len, const char *
void QRasterPlatformPixmap::fromImage(const QImage &sourceImage,
Qt::ImageConversionFlags flags)
{
- Q_UNUSED(flags);
QImage image = sourceImage;
createPixmapForImage(image, flags, /* inplace = */false);
}
+void QRasterPlatformPixmap::fromImageInPlace(QImage &sourceImage,
+ Qt::ImageConversionFlags flags)
+{
+ createPixmapForImage(sourceImage, flags, /* inplace = */true);
+}
+
void QRasterPlatformPixmap::fromImageReader(QImageReader *imageReader,
Qt::ImageConversionFlags flags)
{
@@ -182,7 +187,7 @@ void QRasterPlatformPixmap::fill(const QColor &color)
if (alpha != 255) {
if (!image.hasAlphaChannel()) {
QImage::Format toFormat;
-#if !(defined(QT_COMPILER_SUPPORTS_NEON) || defined(__SSE2__))
+#if !(defined(__ARM_NEON__) || defined(__SSE2__))
if (image.format() == QImage::Format_RGB16)
toFormat = QImage::Format_ARGB8565_Premultiplied;
else if (image.format() == QImage::Format_RGB666)
@@ -311,7 +316,7 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC
QImage::Format opaqueFormat = QNativeImage::systemFormat();
QImage::Format alphaFormat = QImage::Format_ARGB32_Premultiplied;
-#if !defined(QT_COMPILER_SUPPORTS_NEON) && !defined(__SSE2__)
+#if !defined(__ARM_NEON__) && !defined(__SSE2__)
switch (opaqueFormat) {
case QImage::Format_RGB16:
alphaFormat = QImage::Format_ARGB8565_Premultiplied;