summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcompositionfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qcompositionfunctions.cpp')
-rw-r--r--src/gui/painting/qcompositionfunctions.cpp346
1 files changed, 155 insertions, 191 deletions
diff --git a/src/gui/painting/qcompositionfunctions.cpp b/src/gui/painting/qcompositionfunctions.cpp
index 3fc9aa3e4e..00fd749fe6 100644
--- a/src/gui/painting/qcompositionfunctions.cpp
+++ b/src/gui/painting/qcompositionfunctions.cpp
@@ -1,47 +1,11 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include <qglobal.h>
#include "qdrawhelper_p.h"
#include "qrgba64_p.h"
-#include "qrgbaf.h"
+#include "qrgbafloat.h"
QT_BEGIN_NAMESPACE
@@ -328,14 +292,14 @@ typedef Rgba64OperationsC Rgba64Operations;
#if QT_CONFIG(raster_fp)
-static inline QRgba32F qRgba32f(float r, float g, float b, float a)
+static inline QRgbaFloat32 qRgbaFloat32(float r, float g, float b, float a)
{
- return QRgba32F{r, g, b, a};
+ return QRgbaFloat32{r, g, b, a};
}
struct RgbaFPOperationsBase
{
- typedef QRgba32F Type;
+ typedef QRgbaFloat32 Type;
typedef float Scalar;
static inline constexpr Type clear = { 0, 0, 0, 0 };
@@ -358,16 +322,16 @@ struct RgbaFPOperationsBase
struct RgbaFPOperationsC : RgbaFPOperationsBase
{
- typedef QRgba32F OptimalType;
+ typedef QRgbaFloat32 OptimalType;
typedef float OptimalScalar;
static OptimalType load(const Type *ptr)
{
- return QRgba32F { ptr->r, ptr->g, ptr->b, ptr->a };
+ return QRgbaFloat32 { ptr->r, ptr->g, ptr->b, ptr->a };
}
static OptimalType convert(const Type &val)
{
- return QRgba32F { val.r, val.g, val.b, val.a };
+ return QRgbaFloat32 { val.r, val.g, val.b, val.a };
}
static void store(Type *ptr, OptimalType value)
{
@@ -433,25 +397,25 @@ struct RgbaFPOperationsSSE2 : public RgbaFPOperationsBase
typedef __m128 OptimalType;
typedef __m128 OptimalScalar;
- static OptimalType load(const Type *ptr)
+ static OptimalType Q_DECL_VECTORCALL load(const Type *ptr)
{
- return _mm_load_ps(reinterpret_cast<const float *>(ptr));
+ return _mm_loadu_ps(reinterpret_cast<const float *>(ptr));
}
- static OptimalType convert(const Type &value)
+ static OptimalType Q_DECL_VECTORCALL convert(const Type &value)
{
return load(&value);
}
- static void store(Type *ptr, OptimalType value)
+ static void Q_DECL_VECTORCALL store(Type *ptr, OptimalType value)
{
- _mm_store_ps(reinterpret_cast<float *>(ptr), value);
+ _mm_storeu_ps(reinterpret_cast<float *>(ptr), value);
}
- static OptimalType add(OptimalType a, OptimalType b)
+ static OptimalType Q_DECL_VECTORCALL add(OptimalType a, OptimalType b)
{
return _mm_add_ps(a, b);
}
// same as above:
// static OptimalScalar add(OptimalScalar a, OptimalScalar b)
- static OptimalType plus(OptimalType a, OptimalType b)
+ static OptimalType Q_DECL_VECTORCALL plus(OptimalType a, OptimalType b)
{
a = _mm_add_ps(a, b);
__m128 aa = _mm_min_ps(a, _mm_set1_ps(1.0f));
@@ -461,37 +425,37 @@ struct RgbaFPOperationsSSE2 : public RgbaFPOperationsBase
a = _mm_shuffle_ps(a, aa, _MM_SHUFFLE(0, 2, 1, 0));
return a;
}
- static OptimalScalar alpha(OptimalType c)
+ static OptimalScalar Q_DECL_VECTORCALL alpha(OptimalType c)
{
return _mm_shuffle_ps(c, c, _MM_SHUFFLE(3, 3, 3, 3));
}
- static OptimalScalar invAlpha(Scalar c)
+ static OptimalScalar Q_DECL_VECTORCALL invAlpha(Scalar c)
{
return _mm_set1_ps(1.0f - float(c));
}
- static OptimalScalar invAlpha(OptimalType c)
+ static OptimalScalar Q_DECL_VECTORCALL invAlpha(OptimalType c)
{
return _mm_sub_ps(_mm_set1_ps(1.0f), alpha(c));
}
- static OptimalScalar scalar(Scalar n)
+ static OptimalScalar Q_DECL_VECTORCALL scalar(Scalar n)
{
return _mm_set1_ps(float(n));
}
- static OptimalType multiplyAlpha(OptimalType val, OptimalScalar a)
+ static OptimalType Q_DECL_VECTORCALL multiplyAlpha(OptimalType val, OptimalScalar a)
{
return _mm_mul_ps(val, a);
}
- static OptimalType interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
+ static OptimalType Q_DECL_VECTORCALL interpolate(OptimalType x, OptimalScalar a1, OptimalType y, OptimalScalar a2)
{
return add(multiplyAlpha(x, a1), multiplyAlpha(y, a2));
}
- static OptimalType multiplyAlpha8bit(OptimalType val, uint8_t a)
+ static OptimalType Q_DECL_VECTORCALL multiplyAlpha8bit(OptimalType val, uint8_t a)
{
return multiplyAlpha(val, _mm_set1_ps(a * (1.0f / 255.0f)));
}
// same as above:
// static OptimalScalar multiplyAlpha8bit(OptimalScalar a, uint8_t a)
- static OptimalType interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
+ static OptimalType Q_DECL_VECTORCALL interpolate8bit(OptimalType x, uint8_t a1, OptimalType y, uint8_t a2)
{
return add(multiplyAlpha8bit(x, a1), multiplyAlpha8bit(y, a2));
}
@@ -546,12 +510,12 @@ void QT_FASTCALL comp_func_Clear_rgb64(QRgba64 *dest, const QRgba64 *, int lengt
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_Clear_rgbafp(QRgba32F *dest, int length, QRgba32F, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Clear_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32, uint const_alpha)
{
comp_func_Clear_template<RgbaFPOperations>(dest, length, const_alpha);
}
-void QT_FASTCALL comp_func_Clear_rgbafp(QRgba32F *dest, const QRgba32F *, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Clear_rgbafp(QRgbaFloat32 *dest, const QRgbaFloat32 *, int length, uint const_alpha)
{
comp_func_Clear_template<RgbaFPOperations>(dest, length, const_alpha);
}
@@ -616,12 +580,12 @@ void QT_FASTCALL comp_func_Source_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRg
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_Source_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Source_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_Source_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_Source_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Source_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_Source_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -646,11 +610,11 @@ void QT_FASTCALL comp_func_Destination_rgb64(QRgba64 *, const QRgba64 *, int, ui
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_Destination_rgbafp(QRgba32F *, int, QRgba32F, uint)
+void QT_FASTCALL comp_func_solid_Destination_rgbafp(QRgbaFloat32 *, int, QRgbaFloat32, uint)
{
}
-void QT_FASTCALL comp_func_Destination_rgbafp(QRgba32F *, const QRgba32F *, int, uint)
+void QT_FASTCALL comp_func_Destination_rgbafp(QRgbaFloat32 *, const QRgbaFloat32 *, int, uint)
{
}
#endif
@@ -726,13 +690,13 @@ void QT_FASTCALL comp_func_SourceOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_SourceOver_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_SourceOver_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_SourceOver_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_SourceOver_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceOver_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_SourceOver_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -800,12 +764,12 @@ void QT_FASTCALL comp_func_DestinationOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest,
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_DestinationOver_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_DestinationOver_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_DestinationOver_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_DestinationOver_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationOver_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_DestinationOver_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -878,12 +842,12 @@ void QT_FASTCALL comp_func_SourceIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const Q
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_SourceIn_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_SourceIn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_SourceIn_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_SourceIn_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceIn_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_SourceIn_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -951,12 +915,12 @@ void QT_FASTCALL comp_func_DestinationIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, co
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_DestinationIn_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_DestinationIn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_DestinationIn_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_DestinationIn_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationIn_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_DestinationIn_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1027,12 +991,12 @@ void QT_FASTCALL comp_func_SourceOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_SourceOut_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_SourceOut_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_SourceOut_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_SourceOut_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceOut_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_SourceOut_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1100,12 +1064,12 @@ void QT_FASTCALL comp_func_DestinationOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, c
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_DestinationOut_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_DestinationOut_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_DestinationOut_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_DestinationOut_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationOut_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_DestinationOut_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1173,12 +1137,12 @@ void QT_FASTCALL comp_func_SourceAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_SourceAtop_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_SourceAtop_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_SourceAtop_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_SourceAtop_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceAtop_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_SourceAtop_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1251,12 +1215,12 @@ void QT_FASTCALL comp_func_DestinationAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest,
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_DestinationAtop_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_DestinationAtop_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_DestinationAtop_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_DestinationAtop_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationAtop_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_DestinationAtop_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1325,12 +1289,12 @@ void QT_FASTCALL comp_func_XOR_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba6
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_XOR_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_XOR_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_XOR_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_XOR_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_XOR_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_XOR_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1348,7 +1312,7 @@ struct QFullCoverage {
}
#endif
#if QT_CONFIG(raster_fp)
- inline void store(QRgba32F *dest, const QRgba32F src) const
+ inline void store(QRgbaFloat32 *dest, const QRgbaFloat32 src) const
{
*dest = src;
}
@@ -1378,7 +1342,7 @@ struct QPartialCoverage {
}
#endif
#if QT_CONFIG(raster_fp)
- inline void store(QRgba32F *dest, const QRgba32F src) const
+ inline void store(QRgbaFloat32 *dest, const QRgbaFloat32 src) const
{
store_template<RgbaFPOperations>(dest, src);
}
@@ -1391,13 +1355,13 @@ private:
static inline int mix_alpha(int da, int sa)
{
- return 255 - ((255 - sa) * (255 - da) >> 8);
+ return 255 - qt_div_255((255 - sa) * (255 - da));
}
#if QT_CONFIG(raster_64bit)
static inline uint mix_alpha_rgb64(uint da, uint sa)
{
- return 65535U - ((65535U - sa) * (65535U - da) >> 16);
+ return 65535U - qt_div_65535((65535U - sa) * (65535U - da));
}
#endif
@@ -1478,12 +1442,12 @@ void QT_FASTCALL comp_func_Plus_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba
#endif
#if QT_CONFIG(raster_fp)
-void QT_FASTCALL comp_func_solid_Plus_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Plus_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
comp_func_solid_Plus_template<RgbaFPOperations>(dest, length, color, const_alpha);
}
-void QT_FASTCALL comp_func_Plus_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Plus_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
comp_func_Plus_template<RgbaFPOperations>(dest, src, length, const_alpha);
}
@@ -1573,7 +1537,7 @@ static inline float multiply_op_rgbafp(float dst, float src, float da, float sa)
}
template <typename T>
-static inline void comp_func_solid_Multiply_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_Multiply_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -1581,7 +1545,7 @@ static inline void comp_func_solid_Multiply_impl(QRgba32F *dest, int length, QRg
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) multiply_op_rgbafp(a, b, da, sa)
@@ -1591,11 +1555,11 @@ static inline void comp_func_solid_Multiply_impl(QRgba32F *dest, int length, QRg
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Multiply_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Multiply_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Multiply_impl(dest, length, color, QFullCoverage());
@@ -1667,11 +1631,11 @@ void QT_FASTCALL comp_func_Multiply_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const Q
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Multiply_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Multiply_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -1683,11 +1647,11 @@ static inline void comp_func_Multiply_impl(QRgba32F *Q_DECL_RESTRICT dest, const
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Multiply_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Multiply_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Multiply_impl(dest, src, length, QFullCoverage());
@@ -1766,7 +1730,7 @@ void QT_FASTCALL comp_func_solid_Screen_rgb64(QRgba64 *dest, int length, QRgba64
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_solid_Screen_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_Screen_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -1774,7 +1738,7 @@ static inline void comp_func_solid_Screen_impl(QRgba32F *dest, int length, QRgba
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) (1.0f - ((1.0f - a) * (1.0f - b)))
@@ -1784,11 +1748,11 @@ static inline void comp_func_solid_Screen_impl(QRgba32F *dest, int length, QRgba
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Screen_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Screen_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Screen_impl(dest, length, color, QFullCoverage());
@@ -1807,7 +1771,7 @@ static inline void comp_func_Screen_impl(uint *Q_DECL_RESTRICT dest, const uint
int da = qAlpha(d);
int sa = qAlpha(s);
-#define OP(a, b) 255 - (((255-a) * (255-b)) >> 8)
+#define OP(a, b) 255 - qt_div_255((255-a) * (255-b))
int r = OP( qRed(d), qRed(s));
int b = OP( qBlue(d), qBlue(s));
int g = OP(qGreen(d), qGreen(s));
@@ -1837,7 +1801,7 @@ static inline void comp_func_Screen_impl(QRgba64 *Q_DECL_RESTRICT dest, const QR
uint da = d.alpha();
uint sa = s.alpha();
-#define OP(a, b) 65535U - (((65535U-a) * (65535U-b)) >> 16)
+#define OP(a, b) 65535U - qt_div_65535((65535U-a) * (65535U-b))
uint r = OP( d.red(), s.red());
uint b = OP( d.blue(), s.blue());
uint g = OP(d.green(), s.green());
@@ -1859,11 +1823,11 @@ void QT_FASTCALL comp_func_Screen_rgb64(QRgba64 *dest, const QRgba64 *src, int l
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Screen_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Screen_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -1875,11 +1839,11 @@ static inline void comp_func_Screen_impl(QRgba32F *Q_DECL_RESTRICT dest, const Q
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Screen_rgbafp(QRgba32F *dest, const QRgba32F *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Screen_rgbafp(QRgbaFloat32 *dest, const QRgbaFloat32 *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Screen_impl(dest, src, length, QFullCoverage());
@@ -1987,7 +1951,7 @@ static inline float overlay_op_rgbafp(float dst, float src, float da, float sa)
}
template <typename T>
-static inline void comp_func_solid_Overlay_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_Overlay_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -1995,7 +1959,7 @@ static inline void comp_func_solid_Overlay_impl(QRgba32F *dest, int length, QRgb
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) overlay_op_rgbafp(a, b, da, sa)
@@ -2005,11 +1969,11 @@ static inline void comp_func_solid_Overlay_impl(QRgba32F *dest, int length, QRgb
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Overlay_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Overlay_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Overlay_impl(dest, length, color, QFullCoverage());
@@ -2080,11 +2044,11 @@ void QT_FASTCALL comp_func_Overlay_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QR
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Overlay_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Overlay_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -2096,11 +2060,11 @@ static inline void comp_func_Overlay_impl(QRgba32F *Q_DECL_RESTRICT dest, const
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Overlay_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Overlay_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Overlay_impl(dest, src, length, QFullCoverage());
@@ -2194,7 +2158,7 @@ static inline float darken_op_rgbafp(float dst, float src, float da, float sa)
}
template <typename T>
-static inline void comp_func_solid_Darken_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_Darken_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -2202,7 +2166,7 @@ static inline void comp_func_solid_Darken_impl(QRgba32F *dest, int length, QRgba
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) darken_op_rgbafp(a, b, da, sa)
@@ -2212,11 +2176,11 @@ static inline void comp_func_solid_Darken_impl(QRgba32F *dest, int length, QRgba
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Darken_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Darken_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Darken_impl(dest, length, color, QFullCoverage());
@@ -2287,11 +2251,11 @@ void QT_FASTCALL comp_func_Darken_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRg
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Darken_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Darken_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -2303,11 +2267,11 @@ static inline void comp_func_Darken_impl(QRgba32F *Q_DECL_RESTRICT dest, const Q
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Darken_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Darken_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Darken_impl(dest, src, length, QFullCoverage());
@@ -2402,7 +2366,7 @@ static inline float lighten_op_rgbafp(float dst, float src, float da, float sa)
}
template <typename T>
-static inline void comp_func_solid_Lighten_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_Lighten_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -2410,7 +2374,7 @@ static inline void comp_func_solid_Lighten_impl(QRgba32F *dest, int length, QRgb
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) lighten_op_rgbafp(a, b, da, sa)
@@ -2420,11 +2384,11 @@ static inline void comp_func_solid_Lighten_impl(QRgba32F *dest, int length, QRgb
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Lighten_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Lighten_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Lighten_impl(dest, length, color, QFullCoverage());
@@ -2495,11 +2459,11 @@ void QT_FASTCALL comp_func_Lighten_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QR
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Lighten_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Lighten_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -2511,11 +2475,11 @@ static inline void comp_func_Lighten_impl(QRgba32F *Q_DECL_RESTRICT dest, const
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Lighten_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Lighten_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Lighten_impl(dest, src, length, QFullCoverage());
@@ -2643,7 +2607,7 @@ static inline float color_dodge_op_rgbafp(float dst, float src, float da, float
}
template <typename T>
-static inline void comp_func_solid_ColorDodge_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_ColorDodge_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -2651,7 +2615,7 @@ static inline void comp_func_solid_ColorDodge_impl(QRgba32F *dest, int length, Q
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a,b) color_dodge_op_rgbafp(a, b, da, sa)
@@ -2661,11 +2625,11 @@ static inline void comp_func_solid_ColorDodge_impl(QRgba32F *dest, int length, Q
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_ColorDodge_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_ColorDodge_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_ColorDodge_impl(dest, length, color, QFullCoverage());
@@ -2736,11 +2700,11 @@ void QT_FASTCALL comp_func_ColorDodge_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_ColorDodge_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_ColorDodge_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -2752,11 +2716,11 @@ static inline void comp_func_ColorDodge_impl(QRgba32F *Q_DECL_RESTRICT dest, con
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_ColorDodge_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_ColorDodge_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
@@ -2884,7 +2848,7 @@ static inline float color_burn_op_rgbafp(float dst, float src, float da, float s
}
template <typename T>
-static inline void comp_func_solid_ColorBurn_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_ColorBurn_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -2892,7 +2856,7 @@ static inline void comp_func_solid_ColorBurn_impl(QRgba32F *dest, int length, QR
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) color_burn_op_rgbafp(a, b, da, sa)
@@ -2902,11 +2866,11 @@ static inline void comp_func_solid_ColorBurn_impl(QRgba32F *dest, int length, QR
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_ColorBurn_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_ColorBurn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_ColorBurn_impl(dest, length, color, QFullCoverage());
@@ -2977,11 +2941,11 @@ void QT_FASTCALL comp_func_ColorBurn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_ColorBurn_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_ColorBurn_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -2993,11 +2957,11 @@ static inline void comp_func_ColorBurn_impl(QRgba32F *Q_DECL_RESTRICT dest, cons
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_ColorBurn_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_ColorBurn_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
@@ -3108,7 +3072,7 @@ static inline float hardlight_op_rgbafp(float dst, float src, float da, float sa
}
template <typename T>
-static inline void comp_func_solid_HardLight_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_HardLight_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -3116,7 +3080,7 @@ static inline void comp_func_solid_HardLight_impl(QRgba32F *dest, int length, QR
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) hardlight_op_rgbafp(a, b, da, sa)
@@ -3126,11 +3090,11 @@ static inline void comp_func_solid_HardLight_impl(QRgba32F *dest, int length, QR
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_HardLight_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_HardLight_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_HardLight_impl(dest, length, color, QFullCoverage());
@@ -3201,11 +3165,11 @@ void QT_FASTCALL comp_func_HardLight_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_HardLight_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_HardLight_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -3217,11 +3181,11 @@ static inline void comp_func_HardLight_impl(QRgba32F *Q_DECL_RESTRICT dest, cons
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_HardLight_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_HardLight_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_HardLight_impl(dest, src, length, QFullCoverage());
@@ -3351,7 +3315,7 @@ static inline float soft_light_op_rgbafp(float dst, float src, float da, float s
}
template <typename T>
-static inline void comp_func_solid_SoftLight_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_SoftLight_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -3359,7 +3323,7 @@ static inline void comp_func_solid_SoftLight_impl(QRgba32F *dest, int length, QR
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) soft_light_op_rgbafp(a, b, da, sa)
@@ -3369,11 +3333,11 @@ static inline void comp_func_solid_SoftLight_impl(QRgba32F *dest, int length, QR
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_SoftLight_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_SoftLight_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_SoftLight_impl(dest, length, color, QFullCoverage());
@@ -3444,11 +3408,11 @@ void QT_FASTCALL comp_func_SoftLight_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_SoftLight_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_SoftLight_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -3460,11 +3424,11 @@ static inline void comp_func_SoftLight_impl(QRgba32F *Q_DECL_RESTRICT dest, cons
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_SoftLight_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SoftLight_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
@@ -3558,7 +3522,7 @@ static inline float difference_op_rgbafp(float dst, float src, float da, float s
}
template <typename T>
-static inline void comp_func_solid_Difference_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void comp_func_solid_Difference_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -3566,7 +3530,7 @@ static inline void comp_func_solid_Difference_impl(QRgba32F *dest, int length, Q
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) difference_op_rgbafp(a, b, da, sa)
@@ -3576,11 +3540,11 @@ static inline void comp_func_solid_Difference_impl(QRgba32F *dest, int length, Q
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Difference_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Difference_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Difference_impl(dest, length, color, QFullCoverage());
@@ -3651,11 +3615,11 @@ void QT_FASTCALL comp_func_Difference_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Difference_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Difference_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -3667,11 +3631,11 @@ static inline void comp_func_Difference_impl(QRgba32F *Q_DECL_RESTRICT dest, con
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Difference_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Difference_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Difference_impl(dest, src, length, QFullCoverage());
@@ -3749,7 +3713,7 @@ void QT_FASTCALL comp_func_solid_Exclusion_rgb64(QRgba64 *dest, int length, QRgb
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgba32F *dest, int length, QRgba32F color, const T &coverage)
+static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage)
{
float sa = color.alpha();
float sr = color.red();
@@ -3757,7 +3721,7 @@ static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgba32F *dest, in
float sb = color.blue();
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
+ QRgbaFloat32 d = dest[i];
float da = d.alpha();
#define OP(a, b) (a + b - (2.0f * a * b))
@@ -3767,11 +3731,11 @@ static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgba32F *dest, in
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_solid_Exclusion_rgbafp(QRgba32F *dest, int length, QRgba32F color, uint const_alpha)
+void QT_FASTCALL comp_func_solid_Exclusion_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha)
{
if (const_alpha == 255)
comp_func_solid_Exclusion_impl(dest, length, color, QFullCoverage());
@@ -3842,11 +3806,11 @@ void QT_FASTCALL comp_func_Exclusion_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const
#if QT_CONFIG(raster_fp)
template <typename T>
-static inline void comp_func_Exclusion_impl(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, const T &coverage)
+static inline void comp_func_Exclusion_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage)
{
for (int i = 0; i < length; ++i) {
- QRgba32F d = dest[i];
- QRgba32F s = src[i];
+ QRgbaFloat32 d = dest[i];
+ QRgbaFloat32 s = src[i];
float da = d.alpha();
float sa = s.alpha();
@@ -3858,11 +3822,11 @@ static inline void comp_func_Exclusion_impl(QRgba32F *Q_DECL_RESTRICT dest, cons
float a = mix_alpha_rgbafp(da, sa);
#undef OP
- coverage.store(&dest[i], qRgba32f(r, g, b, a));
+ coverage.store(&dest[i], qRgbaFloat32(r, g, b, a));
}
}
-void QT_FASTCALL comp_func_Exclusion_rgbafp(QRgba32F *Q_DECL_RESTRICT dest, const QRgba32F *Q_DECL_RESTRICT src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Exclusion_rgbafp(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Exclusion_impl(dest, src, length, QFullCoverage());