From 910785a77a124621c3084d71a7dc9b97741b61ee Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 9 Apr 2018 13:19:51 +0200 Subject: Get rid of argb32->argb32pm routines in qimage We already have better optimized versions in drawhelper. Removing these versions is a performance gain. Change-Id: I431c74e440529648d9bc5e22c0e700a72d376934 Reviewed-by: Eirik Aavitsland --- src/gui/image/qimage_sse4.cpp | 76 ------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/gui/image/qimage_sse4.cpp (limited to 'src/gui/image/qimage_sse4.cpp') diff --git a/src/gui/image/qimage_sse4.cpp b/src/gui/image/qimage_sse4.cpp deleted file mode 100644 index 2f6649c1bc..0000000000 --- a/src/gui/image/qimage_sse4.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include - -#ifdef QT_COMPILER_SUPPORTS_SSE4_1 - -QT_BEGIN_NAMESPACE - -void QT_FASTCALL storeRGB32FromARGB32PM_sse4(uchar *dest, const uint *src, int index, int count, - const QVector *, QDitherInfo *) -{ - uint *d = reinterpret_cast(dest) + index; - for (int i = 0; i < count; ++i) - d[i] = 0xff000000 | qUnpremultiply_sse4(src[i]); -} - -void convert_ARGB_to_ARGB_PM_sse4(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags) -{ - Q_ASSERT(src->format == QImage::Format_ARGB32 || src->format == QImage::Format_RGBA8888); - Q_ASSERT(dest->format == QImage::Format_ARGB32_Premultiplied || dest->format == QImage::Format_RGBA8888_Premultiplied); - Q_ASSERT(src->width == dest->width); - Q_ASSERT(src->height == dest->height); - - const uint *src_data = (uint *) src->data; - uint *dest_data = (uint *) dest->data; - for (int i = 0; i < src->height; ++i) { - qt_convertARGB32ToARGB32PM(dest_data, src_data, src->width); - src_data += src->bytes_per_line >> 2; - dest_data += dest->bytes_per_line >> 2; - } -} - -QT_END_NAMESPACE - -#endif // QT_COMPILER_SUPPORTS_SSE4_1 -- cgit v1.2.3