From b2196692d7cf26879945da09d4f4cf5c5e4ad1e5 Mon Sep 17 00:00:00 2001 From: LinuxUserGD Date: Wed, 20 Mar 2024 23:36:40 +0100 Subject: [PATCH] disable raster_fp --- src/gui/image/qimage.cpp | 6 +- src/gui/image/qimage_conversions.cpp | 4 +- src/gui/image/qimage_p.h | 2 +- src/gui/painting/qcompositionfunctions.cpp | 84 +++++++++---------- src/gui/painting/qdrawhelper.cpp | 76 ++++++++--------- src/gui/painting/qdrawhelper_avx2.cpp | 8 +- src/gui/painting/qdrawhelper_p.h | 6 +- src/gui/painting/qdrawhelper_sse4.cpp | 2 +- src/gui/painting/qimagescale.cpp | 4 +- src/gui/painting/qpaintengine_raster.cpp | 6 +- src/gui/painting/qpixellayout.cpp | 4 +- src/gui/painting/qpixellayout_p.h | 2 +- tests/auto/gui/image/qimage/tst_qimage.cpp | 4 +- .../gui/painting/qpainter/tst_qpainter.cpp | 4 +- 14 files changed, 106 insertions(+), 106 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 60bf88aac1c..9f9c7ab3e1d 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2189,7 +2189,7 @@ QImage QImage::convertToFormat_helper(Format format, Qt::ImageConversionFlags fl if (!converter && format > QImage::Format_Indexed8 && d->format > QImage::Format_Indexed8) { if (qt_highColorPrecision(d->format, !destLayout->hasAlphaChannel) && qt_highColorPrecision(format, !hasAlphaChannel())) { -#if QT_CONFIG(raster_fp) +#if 0 if (qt_fpColorPrecision(d->format) && qt_fpColorPrecision(format)) converter = convert_generic_over_rgba32f; else @@ -4663,7 +4663,7 @@ QImage QImage::smoothScaled(int w, int h) const src.convertTo(QImage::Format_RGBA64_Premultiplied); break; #endif -#if QT_CONFIG(raster_fp) +#if 0 case QImage::Format_RGBX32FPx4: case QImage::Format_RGBA32FPx4_Premultiplied: break; @@ -5214,7 +5214,7 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla // any direct ones are probably better even if not inplace. if (qt_highColorPrecision(newFormat, !qPixelLayouts[newFormat].hasAlphaChannel) && qt_highColorPrecision(format, !qPixelLayouts[format].hasAlphaChannel)) { -#if QT_CONFIG(raster_fp) +#if 0 if (qt_fpColorPrecision(format) && qt_fpColorPrecision(newFormat)) return convert_generic_inplace_over_rgba32f(this, newFormat, flags); #endif diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp index 2e1eb5e5e40..5799be69e70 100644 --- a/src/gui/image/qimage_conversions.cpp +++ b/src/gui/image/qimage_conversions.cpp @@ -279,7 +279,7 @@ void convert_generic_over_rgb64(QImageData *dest, const QImageData *src, Qt::Ima #endif } -#if QT_CONFIG(raster_fp) +#if 0 void convert_generic_over_rgba32f(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags) { Q_ASSERT(dest->format >= QImage::Format_RGBX16FPx4); @@ -556,7 +556,7 @@ bool convert_generic_inplace_over_rgb64(QImageData *data, QImage::Format dst_for return true; } -#if QT_CONFIG(raster_fp) +#if 0 bool convert_generic_inplace_over_rgba32f(QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags) { Q_ASSERT(data->format >= QImage::Format_RGBX16FPx4); diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index 27b32ca2003..96b1845f3f1 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -124,7 +124,7 @@ void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversio void convert_generic_over_rgb64(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags); bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags); bool convert_generic_inplace_over_rgb64(QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags); -#if QT_CONFIG(raster_fp) +#if 0 void convert_generic_over_rgba32f(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags); bool convert_generic_inplace_over_rgba32f(QImageData *data, QImage::Format dst_format, Qt::ImageConversionFlags); #endif diff --git a/src/gui/painting/qcompositionfunctions.cpp b/src/gui/painting/qcompositionfunctions.cpp index b43e2fd23cb..2cc33eae4bc 100644 --- a/src/gui/painting/qcompositionfunctions.cpp +++ b/src/gui/painting/qcompositionfunctions.cpp @@ -290,7 +290,7 @@ typedef Rgba64OperationsC Rgba64Operations; #endif // 0 -#if QT_CONFIG(raster_fp) +#if 0 static inline QRgbaFloat32 qRgbaFloat32(float r, float g, float b, float a) { @@ -468,7 +468,7 @@ typedef RgbaFPOperationsSSE2 RgbaFPOperations; typedef RgbaFPOperationsC RgbaFPOperations; #endif -#endif // QT_CONFIG(raster_fp) +#endif // 0 /* result = 0 @@ -509,7 +509,7 @@ void QT_FASTCALL comp_func_Clear_rgb64(QRgba64 *dest, const QRgba64 *, int lengt } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_Clear_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32, uint const_alpha) { comp_func_Clear_template(dest, length, const_alpha); @@ -579,7 +579,7 @@ void QT_FASTCALL comp_func_Source_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRg } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_Source_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_Source_template(dest, length, color, const_alpha); @@ -609,7 +609,7 @@ void QT_FASTCALL comp_func_Destination_rgb64(QRgba64 *, const QRgba64 *, int, ui } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_Destination_rgbafp(QRgbaFloat32 *, int, QRgbaFloat32, uint) { } @@ -689,7 +689,7 @@ void QT_FASTCALL comp_func_SourceOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_SourceOver_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_SourceOver_template(dest, length, color, const_alpha); @@ -763,7 +763,7 @@ void QT_FASTCALL comp_func_DestinationOver_rgb64(QRgba64 *Q_DECL_RESTRICT dest, } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_DestinationOver_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_DestinationOver_template(dest, length, color, const_alpha); @@ -841,7 +841,7 @@ void QT_FASTCALL comp_func_SourceIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const Q } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_SourceIn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_SourceIn_template(dest, length, color, const_alpha); @@ -914,7 +914,7 @@ void QT_FASTCALL comp_func_DestinationIn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, co } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_DestinationIn_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_DestinationIn_template(dest, length, color, const_alpha); @@ -990,7 +990,7 @@ void QT_FASTCALL comp_func_SourceOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_SourceOut_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_SourceOut_template(dest, length, color, const_alpha); @@ -1063,7 +1063,7 @@ void QT_FASTCALL comp_func_DestinationOut_rgb64(QRgba64 *Q_DECL_RESTRICT dest, c } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_DestinationOut_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_DestinationOut_template(dest, length, color, const_alpha); @@ -1136,7 +1136,7 @@ void QT_FASTCALL comp_func_SourceAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_SourceAtop_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_SourceAtop_template(dest, length, color, const_alpha); @@ -1214,7 +1214,7 @@ void QT_FASTCALL comp_func_DestinationAtop_rgb64(QRgba64 *Q_DECL_RESTRICT dest, } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_DestinationAtop_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_DestinationAtop_template(dest, length, color, const_alpha); @@ -1288,7 +1288,7 @@ void QT_FASTCALL comp_func_XOR_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba6 } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_XOR_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_XOR_template(dest, length, color, const_alpha); @@ -1311,7 +1311,7 @@ struct QFullCoverage { *dest = src; } #endif -#if QT_CONFIG(raster_fp) +#if 0 inline void store(QRgbaFloat32 *dest, const QRgbaFloat32 src) const { *dest = src; @@ -1341,7 +1341,7 @@ struct QPartialCoverage { store_template(dest, src); } #endif -#if QT_CONFIG(raster_fp) +#if 0 inline void store(QRgbaFloat32 *dest, const QRgbaFloat32 src) const { store_template(dest, src); @@ -1365,7 +1365,7 @@ static inline uint mix_alpha_rgb64(uint da, uint sa) } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float mix_alpha_rgbafp(float da, float sa) { return 1.0f - (1.0f - sa) * (1.0f - da); @@ -1441,7 +1441,7 @@ void QT_FASTCALL comp_func_Plus_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRgba } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_Plus_rgbafp(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, uint const_alpha) { comp_func_solid_Plus_template(dest, length, color, const_alpha); @@ -1530,7 +1530,7 @@ void QT_FASTCALL comp_func_solid_Multiply_rgb64(QRgba64 *dest, int length, QRgba } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float multiply_op_rgbafp(float dst, float src, float da, float sa) { return src * dst + src * (1.0f - da) + dst * (1.0f - sa); @@ -1629,7 +1629,7 @@ void QT_FASTCALL comp_func_Multiply_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const Q } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Multiply_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -1728,7 +1728,7 @@ void QT_FASTCALL comp_func_solid_Screen_rgb64(QRgba64 *dest, int length, QRgba64 } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_solid_Screen_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage) { @@ -1821,7 +1821,7 @@ void QT_FASTCALL comp_func_Screen_rgb64(QRgba64 *dest, const QRgba64 *src, int l } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Screen_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -1940,7 +1940,7 @@ void QT_FASTCALL comp_func_solid_Overlay_rgb64(QRgba64 *dest, int length, QRgba6 } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float overlay_op_rgbafp(float dst, float src, float da, float sa) { const float temp = src * (1.0f - da) + dst * (1.0f - sa); @@ -2042,7 +2042,7 @@ void QT_FASTCALL comp_func_Overlay_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QR } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Overlay_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -2151,7 +2151,7 @@ void QT_FASTCALL comp_func_solid_Darken_rgb64(QRgba64 *dest, int length, QRgba64 } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float darken_op_rgbafp(float dst, float src, float da, float sa) { return qMin(src * da, dst * sa) + src * (1.0f - da) + dst * (1.0f - sa); @@ -2249,7 +2249,7 @@ void QT_FASTCALL comp_func_Darken_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QRg } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Darken_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -2359,7 +2359,7 @@ void QT_FASTCALL comp_func_solid_Lighten_rgb64(QRgba64 *dest, int length, QRgba6 } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float lighten_op_rgbafp(float dst, float src, float da, float sa) { return qMax(src * da, dst * sa) + src * (1.0f - da) + dst * (1.0f - sa); @@ -2457,7 +2457,7 @@ void QT_FASTCALL comp_func_Lighten_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const QR } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Lighten_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -2590,7 +2590,7 @@ void QT_FASTCALL comp_func_solid_ColorDodge_rgb64(QRgba64 *dest, int length, QRg } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float color_dodge_op_rgbafp(float dst, float src, float da, float sa) { const float sa_da = sa * da; @@ -2698,7 +2698,7 @@ void QT_FASTCALL comp_func_ColorDodge_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_ColorDodge_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -2831,7 +2831,7 @@ void QT_FASTCALL comp_func_solid_ColorBurn_rgb64(QRgba64 *dest, int length, QRgb } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float color_burn_op_rgbafp(float dst, float src, float da, float sa) { const float src_da = src * da; @@ -2939,7 +2939,7 @@ void QT_FASTCALL comp_func_ColorBurn_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_ColorBurn_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -3060,7 +3060,7 @@ void QT_FASTCALL comp_func_solid_HardLight_rgb64(QRgba64 *dest, int length, QRgb } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float hardlight_op_rgbafp(float dst, float src, float da, float sa) { const float temp = src * (1.0f - da) + dst * (1.0f - sa); @@ -3163,7 +3163,7 @@ void QT_FASTCALL comp_func_HardLight_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_HardLight_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -3298,7 +3298,7 @@ void QT_FASTCALL comp_func_solid_SoftLight_rgb64(QRgba64 *dest, int length, QRgb #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float soft_light_op_rgbafp(float dst, float src, float da, float sa) { const float src2 = src * 2; @@ -3406,7 +3406,7 @@ void QT_FASTCALL comp_func_SoftLight_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_SoftLight_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -3515,7 +3515,7 @@ void QT_FASTCALL comp_func_solid_Difference_rgb64(QRgba64 *dest, int length, QRg } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline float difference_op_rgbafp(float dst, float src, float da, float sa) { return src + dst - (2 * qMin(src * da, dst * sa)); @@ -3613,7 +3613,7 @@ void QT_FASTCALL comp_func_Difference_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Difference_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -3711,7 +3711,7 @@ void QT_FASTCALL comp_func_solid_Exclusion_rgb64(QRgba64 *dest, int length, QRgb } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void QT_FASTCALL comp_func_solid_Exclusion_impl(QRgbaFloat32 *dest, int length, QRgbaFloat32 color, const T &coverage) { @@ -3804,7 +3804,7 @@ void QT_FASTCALL comp_func_Exclusion_rgb64(QRgba64 *Q_DECL_RESTRICT dest, const } #endif -#if QT_CONFIG(raster_fp) +#if 0 template static inline void comp_func_Exclusion_impl(QRgbaFloat32 *Q_DECL_RESTRICT dest, const QRgbaFloat32 *Q_DECL_RESTRICT src, int length, const T &coverage) { @@ -4218,7 +4218,7 @@ CompositionFunctionSolid64 qt_functionForModeSolid64_C[] = { }; CompositionFunctionSolidFP qt_functionForModeSolidFP_C[] = { -#if QT_CONFIG(raster_fp) +#if 0 comp_func_solid_SourceOver_rgbafp, comp_func_solid_DestinationOver_rgbafp, comp_func_solid_Clear_rgbafp, @@ -4328,7 +4328,7 @@ CompositionFunction64 qt_functionForMode64_C[] = { }; CompositionFunctionFP qt_functionForModeFP_C[] = { -#if QT_CONFIG(raster_fp) +#if 0 comp_func_SourceOver_rgbafp, comp_func_DestinationOver_rgbafp, comp_func_Clear_rgbafp, diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 7f6b4662428..5a1d980e156 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -216,7 +216,7 @@ static Convert64Func convert64ToRGBA64PM[QImage::NImageFormats] = { }; #endif -#if QT_CONFIG(raster_fp) +#if 0 static void QT_FASTCALL convertRGBA64PMToRGBA32F(QRgbaFloat32 *buffer, const quint64 *src, int count) { const auto *in = reinterpret_cast(src); @@ -451,7 +451,7 @@ static DestFetchProc64 destFetchProc64[QImage::NImageFormats] = }; #endif -#if QT_CONFIG(raster_fp) +#if 0 static QRgbaFloat32 *QT_FASTCALL destFetchFP(QRgbaFloat32 *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) { return const_cast(qFetchToRGBA32F[rasterBuffer->format](buffer, rasterBuffer->scanLine(y), x, length, nullptr, nullptr)); @@ -798,7 +798,7 @@ static DestStoreProc64 destStoreProc64[QImage::NImageFormats] = }; #endif -#if QT_CONFIG(raster_fp) +#if 0 static void QT_FASTCALL destStoreFP(QRasterBuffer *rasterBuffer, int x, int y, const QRgbaFloat32 *buffer, int length) { auto store = qStoreFromRGBA32F[rasterBuffer->format]; @@ -872,7 +872,7 @@ static const QRgba64 *QT_FASTCALL fetchUntransformedRGBA64PM(QRgba64 *, const Op } #endif -#if QT_CONFIG(raster_fp) +#if 0 static const QRgbaFloat32 *QT_FASTCALL fetchUntransformedFP(QRgbaFloat32 *buffer, const Operator *, const QSpanData *data, int y, int x, int length) { @@ -1110,7 +1110,7 @@ static const QRgba64 *QT_FASTCALL fetchTransformed64(QRgba64 *buffer, const Oper } #endif -#if QT_CONFIG(raster_fp) +#if 0 template /* either BlendTransformed or BlendTransformedTiled */ static const QRgbaFloat32 *QT_FASTCALL fetchTransformedFP(QRgbaFloat32 *buffer, const Operator *, const QSpanData *data, int y, int x, int length) @@ -2809,7 +2809,7 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co } #endif -#if QT_CONFIG(raster_fp) +#if 0 static void interpolate_simple_rgba32f(QRgbaFloat32 *b, const QRgbaFloat32 *buf1, const QRgbaFloat32 *buf2, int len, int &fx, int fdx, int &fy, int fdy) @@ -3067,7 +3067,7 @@ static const QRgbaFloat32 *QT_FASTCALL fetchTransformedBilinearFP(QRgbaFloat32 * return fetchTransformedBilinearFP_uint32(buffer, data, y, x, length); } } -#endif // QT_CONFIG(raster_fp) +#endif // 0 // FetchUntransformed can have more specialized methods added depending on SIMD features. static SourceFetchProc sourceFetchUntransformed[QImage::NImageFormats] = { @@ -3185,7 +3185,7 @@ static inline SourceFetchProc64 getSourceFetch64(TextureBlendType blendType, QIm } #endif -#if QT_CONFIG(raster_fp) +#if 0 static const SourceFetchProcFP sourceFetchGenericFP[NBlendTypes] = { fetchUntransformedFP, // Untransformed fetchUntransformedFP, // Tiled @@ -3219,7 +3219,7 @@ static const QRgba64& qt_gradient_pixel64_fixed(const QGradientData *data, int f } #endif -#if QT_CONFIG(raster_fp) +#if 0 static inline QRgbaFloat32 qt_gradient_pixelFP(const QGradientData *data, qreal pos) { int ipos = int(pos * (GRADIENT_STOPTABLE_SIZE - 1) + qreal(0.5)); @@ -3290,7 +3290,7 @@ class GradientBase64 }; #endif -#if QT_CONFIG(raster_fp) +#if 0 class GradientBaseFP { public: @@ -3399,7 +3399,7 @@ static const QRgba64 * QT_FASTCALL qt_fetch_linear_gradient_rgb64(QRgba64 *buffe return qt_fetch_linear_gradient_template(buffer, op, data, y, x, length); } #endif -#if QT_CONFIG(raster_fp) +#if 0 static const QRgbaFloat32 * QT_FASTCALL qt_fetch_linear_gradient_rgbfp(QRgbaFloat32 *buffer, const Operator *op, const QSpanData *data, int y, int x, int length) { @@ -3480,7 +3480,7 @@ const QRgba64 * QT_FASTCALL qt_fetch_radial_gradient_rgb64(QRgba64 *buffer, cons } #endif -#if QT_CONFIG(raster_fp) +#if 0 static const QRgbaFloat32 * QT_FASTCALL qt_fetch_radial_gradient_rgbfp(QRgbaFloat32 *buffer, const Operator *op, const QSpanData *data, int y, int x, int length) { @@ -3553,7 +3553,7 @@ static const QRgba64 * QT_FASTCALL qt_fetch_conical_gradient_rgb64(QRgba64 *buff } #endif -#if QT_CONFIG(raster_fp) +#if 0 static const QRgbaFloat32 * QT_FASTCALL qt_fetch_conical_gradient_rgbfp(QRgbaFloat32 *buffer, const Operator *, const QSpanData *data, int y, int x, int length) { @@ -3569,7 +3569,7 @@ static const CompositionFunctionSolid *functionForModeSolid = qt_functionForMode #if 0 static const CompositionFunctionSolid64 *functionForModeSolid64 = qt_functionForModeSolid64_C; #endif -#if QT_CONFIG(raster_fp) +#if 0 static const CompositionFunctionSolidFP *functionForModeSolidFP = qt_functionForModeSolidFP_C; #endif @@ -3581,7 +3581,7 @@ static const CompositionFunction *functionForMode = qt_functionForMode_C; #if 0 static const CompositionFunction64 *functionForMode64 = qt_functionForMode64_C; #endif -#if QT_CONFIG(raster_fp) +#if 0 static const CompositionFunctionFP *functionForModeFP = qt_functionForModeFP_C; #endif @@ -3627,7 +3627,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span #if 0 op.srcFetch64 = qt_fetch_linear_gradient_rgb64; #endif -#if QT_CONFIG(raster_fp) +#if 0 op.srcFetchFP = qt_fetch_linear_gradient_rgbfp; #endif break; @@ -3638,7 +3638,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span #if 0 op.srcFetch64 = qt_fetch_radial_gradient_rgb64; #endif -#if QT_CONFIG(raster_fp) +#if 0 op.srcFetchFP = qt_fetch_radial_gradient_rgbfp; #endif break; @@ -3648,7 +3648,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span #if 0 op.srcFetch64 = qt_fetch_conical_gradient_rgb64; #endif -#if QT_CONFIG(raster_fp) +#if 0 op.srcFetchFP = qt_fetch_conical_gradient_rgbfp; #endif break; @@ -3658,7 +3658,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span #if 0 op.srcFetch64 = getSourceFetch64(getBlendType(data), data->texture.format);; #endif -#if QT_CONFIG(raster_fp) +#if 0 op.srcFetchFP = getSourceFetchFP(getBlendType(data), data->texture.format); #endif break; @@ -3669,7 +3669,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span #if !0 op.srcFetch64 = nullptr; #endif -#if !QT_CONFIG(raster_fp) +#if !0 op.srcFetchFP = nullptr; #endif @@ -3683,7 +3683,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span #else op.destFetch64 = nullptr; #endif -#if QT_CONFIG(raster_fp) +#if 0 op.destFetchFP = destFetchProcFP[data->rasterBuffer->format]; #else op.destFetchFP = nullptr; @@ -3708,7 +3708,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span if (op.destFetch64 != destFetchRGB64) op.destFetch64 = destFetch64Undefined; #endif -#if QT_CONFIG(raster_fp) +#if 0 if (op.destFetchFP != destFetchRGBFP) op.destFetchFP = destFetchFPUndefined; #endif @@ -3727,7 +3727,7 @@ static inline Operator getOperator(const QSpanData *data, const QT_FT_Span *span op.funcSolid64 = nullptr; op.func64 = nullptr; #endif -#if QT_CONFIG(raster_fp) +#if 0 op.destStoreFP = destStoreFP; op.funcSolidFP = functionForModeSolidFP[op.mode]; op.funcFP = functionForModeFP[op.mode]; @@ -3922,7 +3922,7 @@ static void blend_color_generic_rgb64(int count, const QT_FT_Span *spans, void * static void blend_color_generic_fp(int count, const QT_FT_Span *spans, void *userData) { -#if QT_CONFIG(raster_fp) +#if 0 QSpanData *data = reinterpret_cast(userData); const Operator op = getOperator(data, nullptr, 0); if (!op.funcSolidFP || !op.destFetchFP) { @@ -4100,7 +4100,7 @@ class BlendSrcGenericRGB64 : public QBlendBase }; #endif -#if QT_CONFIG(raster_fp) +#if 0 class BlendSrcGenericRGBFP : public QBlendBase { public: @@ -4160,7 +4160,7 @@ static void blend_src_generic_rgb64(int count, const QT_FT_Span *spans, void *us } #endif -#if QT_CONFIG(raster_fp) +#if 0 static void blend_src_generic_fp(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); @@ -4286,7 +4286,7 @@ static void blend_untransformed_generic_rgb64(int count, const QT_FT_Span *spans } #endif -#if QT_CONFIG(raster_fp) +#if 0 static void blend_untransformed_generic_fp(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); @@ -4658,7 +4658,7 @@ static void blend_tiled_generic_rgb64(int count, const QT_FT_Span *spans, void * } #endif -#if QT_CONFIG(raster_fp) +#if 0 static void blend_tiled_generic_fp(int count, const QT_FT_Span *spans, void *userData) { QSpanData *data = reinterpret_cast(userData); @@ -4908,7 +4908,7 @@ static const ProcessSpans processTextureSpansGeneric64[NBlendTypes] = { }; #endif -#if QT_CONFIG(raster_fp) +#if 0 static const ProcessSpans processTextureSpansGenericFP[NBlendTypes] = { blend_untransformed_generic_fp, // Untransformed blend_tiled_generic_fp, // Tiled @@ -4944,7 +4944,7 @@ void qBlendTexture(int count, const QT_FT_Span *spans, void *userData) case QImage::Format_RGBA64: case QImage::Format_RGBA64_Premultiplied: case QImage::Format_Grayscale16: -#if !QT_CONFIG(raster_fp) +#if !0 case QImage::Format_RGBX16FPx4: case QImage::Format_RGBA16FPx4: case QImage::Format_RGBA16FPx4_Premultiplied: @@ -4956,7 +4956,7 @@ void qBlendTexture(int count, const QT_FT_Span *spans, void *userData) proc = processTextureSpansGeneric64[blendType]; break; #endif // 0 -#if QT_CONFIG(raster_fp) +#if 0 case QImage::Format_RGBX16FPx4: case QImage::Format_RGBA16FPx4: case QImage::Format_RGBA16FPx4_Premultiplied: @@ -5066,7 +5066,7 @@ void qBlendGradient(int count, const QT_FT_Span *spans, void *userData) case QImage::Format_RGBX64: case QImage::Format_RGBA64: case QImage::Format_RGBA64_Premultiplied: -#if !QT_CONFIG(raster_fp) +#if !0 case QImage::Format_RGBX16FPx4: case QImage::Format_RGBA16FPx4: case QImage::Format_RGBA16FPx4_Premultiplied: @@ -5079,7 +5079,7 @@ void qBlendGradient(int count, const QT_FT_Span *spans, void *userData) return blend_vertical_gradient(count, spans, userData); return blend_src_generic_rgb64(count, spans, userData); #endif // 0 -#if QT_CONFIG(raster_fp) +#if 0 case QImage::Format_RGBX16FPx4: case QImage::Format_RGBA16FPx4: case QImage::Format_RGBA16FPx4_Premultiplied: @@ -6463,14 +6463,14 @@ static void qInitDrawhelperFunctions() destStoreProc64[QImage::Format_ARGB32] = destStore64ARGB32_sse4; destStoreProc64[QImage::Format_RGBA8888] = destStore64RGBA8888_sse4; #endif -#if QT_CONFIG(raster_fp) +#if 0 extern const QRgbaFloat32 *QT_FASTCALL fetchRGBA32FToRGBA32F_sse4(QRgbaFloat32 *buffer, const uchar *src, int index, int count, const QList *, QDitherInfo *); extern void QT_FASTCALL storeRGBX32FFromRGBA32F_sse4(uchar *dest, const QRgbaFloat32 *src, int index, int count, const QList *, QDitherInfo *); extern void QT_FASTCALL storeRGBA32FFromRGBA32F_sse4(uchar *dest, const QRgbaFloat32 *src, int index, int count, const QList *, QDitherInfo *); qFetchToRGBA32F[QImage::Format_RGBA32FPx4] = fetchRGBA32FToRGBA32F_sse4; qStoreFromRGBA32F[QImage::Format_RGBX32FPx4] = storeRGBX32FFromRGBA32F_sse4; qStoreFromRGBA32F[QImage::Format_RGBA32FPx4] = storeRGBA32FFromRGBA32F_sse4; -#endif // QT_CONFIG(raster_fp) +#endif // 0 } #endif @@ -6507,7 +6507,7 @@ static void qInitDrawhelperFunctions() qt_functionForMode64_C[QPainter::CompositionMode_SourceOver] = comp_func_SourceOver_rgb64_avx2; qt_functionForModeSolid64_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_rgb64_avx2; #endif -#if QT_CONFIG(raster_fp) +#if 0 extern void QT_FASTCALL comp_func_Source_rgbafp_avx2(QRgbaFloat32 *destPixels, const QRgbaFloat32 *srcPixels, int length, uint const_alpha); extern void QT_FASTCALL comp_func_SourceOver_rgbafp_avx2(QRgbaFloat32 *destPixels, const QRgbaFloat32 *srcPixels, int length, uint const_alpha); extern void QT_FASTCALL comp_func_solid_Source_rgbafp_avx2(QRgbaFloat32 *destPixels, int length, QRgbaFloat32 color, uint const_alpha); @@ -6569,14 +6569,14 @@ static void qInitDrawhelperFunctions() qPixelLayouts[QImage::Format_RGBA16FPx4_Premultiplied].fetchToRGBA64PM = fetchRGBA16FPMToRGBA64PM_avx2; qPixelLayouts[QImage::Format_RGBA16FPx4_Premultiplied].storeFromARGB32PM = storeRGB16FFromRGB32_avx2; qPixelLayouts[QImage::Format_RGBA16FPx4_Premultiplied].storeFromRGB32 = storeRGB16FFromRGB32_avx2; -#if QT_CONFIG(raster_fp) +#if 0 extern const QRgbaFloat32 *QT_FASTCALL fetchRGBA16FToRGBA32F_avx2(QRgbaFloat32 *buffer, const uchar *src, int index, int count, const QList *, QDitherInfo *); extern void QT_FASTCALL storeRGBX16FFromRGBA32F_avx2(uchar *dest, const QRgbaFloat32 *src, int index, int count, const QList *, QDitherInfo *); extern void QT_FASTCALL storeRGBA16FFromRGBA32F_avx2(uchar *dest, const QRgbaFloat32 *src, int index, int count, const QList *, QDitherInfo *); qFetchToRGBA32F[QImage::Format_RGBA16FPx4] = fetchRGBA16FToRGBA32F_avx2; qStoreFromRGBA32F[QImage::Format_RGBX16FPx4] = storeRGBX16FFromRGBA32F_avx2; qStoreFromRGBA32F[QImage::Format_RGBA16FPx4] = storeRGBA16FFromRGBA32F_avx2; -#endif // QT_CONFIG(raster_fp) +#endif // 0 } #endif diff --git a/src/gui/painting/qdrawhelper_avx2.cpp b/src/gui/painting/qdrawhelper_avx2.cpp index a6184efe4fa..8de1fd1666e 100644 --- a/src/gui/painting/qdrawhelper_avx2.cpp +++ b/src/gui/painting/qdrawhelper_avx2.cpp @@ -420,7 +420,7 @@ void QT_FASTCALL comp_func_SourceOver_rgb64_avx2(QRgba64 *dst, const QRgba64 *sr } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_SourceOver_rgbafp_avx2(QRgbaFloat32 *dst, const QRgbaFloat32 *src, int length, uint const_alpha) { Q_ASSERT(const_alpha < 256); // const_alpha is in [0-255] @@ -520,7 +520,7 @@ void QT_FASTCALL comp_func_Source_rgb64_avx2(QRgba64 *dst, const QRgba64 *src, i } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_Source_rgbafp_avx2(QRgbaFloat32 *dst, const QRgbaFloat32 *src, int length, uint const_alpha) { Q_ASSERT(const_alpha < 256); // const_alpha is in [0-255] @@ -619,7 +619,7 @@ void QT_FASTCALL comp_func_solid_SourceOver_rgb64_avx2(QRgba64 *destPixels, int } #endif -#if QT_CONFIG(raster_fp) +#if 0 void QT_FASTCALL comp_func_solid_Source_rgbafp_avx2(QRgbaFloat32 *dst, int length, QRgbaFloat32 color, uint const_alpha) { Q_ASSERT(const_alpha < 256); // const_alpha is in [0-255] @@ -1539,7 +1539,7 @@ void QT_FASTCALL storeRGBA16FFromARGB32PM_avx2(uchar *dest, const uint *src, int } } -#if QT_CONFIG(raster_fp) +#if 0 const QRgbaFloat32 *QT_FASTCALL fetchRGBA16FToRGBA32F_avx2(QRgbaFloat32 *buffer, const uchar *src, int index, int count, const QList *, QDitherInfo *) { diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 9ed7c8b2e0e..d48bf20e753 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -265,7 +265,7 @@ struct QGradientData #define GRADIENT_STOPTABLE_SIZE 1024 #define GRADIENT_STOPTABLE_SIZE_SHIFT 10 -#if 0 || QT_CONFIG(raster_fp) +#if 0 || 0 const QRgba64 *colorTable64; //[GRADIENT_STOPTABLE_SIZE]; #endif const QRgb *colorTable32; //[GRADIENT_STOPTABLE_SIZE]; @@ -811,7 +811,7 @@ static inline QRgba64 interpolate_4_pixels_rgb64(const QRgba64 t[], const QRgba6 } #endif // __SSE2__ -#if QT_CONFIG(raster_fp) +#if 0 static inline QRgbaFloat32 multiplyAlpha_rgba32f(QRgbaFloat32 c, float a) { return QRgbaFloat32 { c.r * a, c.g * a, c.b * a, c.a * a }; @@ -860,7 +860,7 @@ static inline QRgbaFloat32 interpolate_4_pixels_rgba32f(const QRgbaFloat32 t[], return xtop; #endif } -#endif // QT_CONFIG(raster_fp) +#endif // 0 static inline uint BYTE_MUL_RGB16(uint x, uint a) { a += 1; diff --git a/src/gui/painting/qdrawhelper_sse4.cpp b/src/gui/painting/qdrawhelper_sse4.cpp index dc2862f50e5..9e0e9b4ac71 100644 --- a/src/gui/painting/qdrawhelper_sse4.cpp +++ b/src/gui/painting/qdrawhelper_sse4.cpp @@ -515,7 +515,7 @@ void QT_FASTCALL storeRGBx64FromRGBA64PM_sse4(uchar *dest, const QRgba64 *src, i convertRGBA64FromRGBA64PM_sse4(d, src, count); } -#if QT_CONFIG(raster_fp) +#if 0 const QRgbaFloat32 *QT_FASTCALL fetchRGBA32FToRGBA32F_sse4(QRgbaFloat32 *buffer, const uchar *src, int index, int count, const QList *, QDitherInfo *) { diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp index cecae45c801..41011e1f290 100644 --- a/src/gui/painting/qimagescale.cpp +++ b/src/gui/painting/qimagescale.cpp @@ -756,7 +756,7 @@ static void qt_qimageScaleRgba64_down_xy(QImageScaleInfo *isi, QRgba64 *dest, } #endif -#if QT_CONFIG(raster_fp) +#if 0 static void qt_qimageScaleRgbaFP_up_x_down_y(QImageScaleInfo *isi, QRgbaFloat32 *dest, int dw, int dh, int dow, int sow); @@ -1196,7 +1196,7 @@ QImage qSmoothScaleImage(const QImage &src, int dw, int dh) return QImage(); } -#if QT_CONFIG(raster_fp) +#if 0 if (qt_fpColorPrecision(src.format())) qt_qimageScaleRgbaFP(scaleinfo, (QRgbaFloat32 *)buffer.scanLine(0), dw, dh, dw, src.bytesPerLine() / 16); diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index b9cc7bb790d..132191ebabc 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -4499,7 +4499,7 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode auto cacheInfo = qt_gradient_cache()->getBuffer(*g, alpha); gradient.colorTable32 = cacheInfo->buffer32; -#if 0 || QT_CONFIG(raster_fp) +#if 0 || 0 gradient.colorTable64 = cacheInfo->buffer64; #endif cachedGradient = std::move(cacheInfo); @@ -4523,7 +4523,7 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode auto cacheInfo = qt_gradient_cache()->getBuffer(*g, alpha); gradient.colorTable32 = cacheInfo->buffer32; -#if 0 || QT_CONFIG(raster_fp) +#if 0 || 0 gradient.colorTable64 = cacheInfo->buffer64; #endif cachedGradient = std::move(cacheInfo); @@ -4551,7 +4551,7 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode auto cacheInfo = qt_gradient_cache()->getBuffer(*g, alpha); gradient.colorTable32 = cacheInfo->buffer32; -#if 0 || QT_CONFIG(raster_fp) +#if 0 || 0 gradient.colorTable64 = cacheInfo->buffer64; #endif cachedGradient = std::move(cacheInfo); diff --git a/src/gui/painting/qpixellayout.cpp b/src/gui/painting/qpixellayout.cpp index 9e08bbd15aa..07b14ec29a1 100644 --- a/src/gui/painting/qpixellayout.cpp +++ b/src/gui/painting/qpixellayout.cpp @@ -1955,7 +1955,7 @@ ConvertAndStorePixelsFunc64 qStoreFromRGBA64PM[QImage::NImageFormats] = { storeRGBA32FPMFromRGBA64PM, }; -#if QT_CONFIG(raster_fp) +#if 0 static void QT_FASTCALL convertToRgbaF32(QRgbaFloat32 *dest, const uint *src, int length) { for (int i = 0; i < length; ++i) @@ -2316,6 +2316,6 @@ ConvertAndStorePixelsFuncFP qStoreFromRGBA32F[QImage::NImageFormats] = { storeRGBA32FFromRGBA32F, storeRGBA32FPMFromRGBA32F, }; -#endif // QT_CONFIG(raster_fp) +#endif // 0 QT_END_NAMESPACE diff --git a/src/gui/painting/qpixellayout_p.h b/src/gui/painting/qpixellayout_p.h index 45f6c15365a..b1b14d65ffc 100644 --- a/src/gui/painting/qpixellayout_p.h +++ b/src/gui/painting/qpixellayout_p.h @@ -320,7 +320,7 @@ struct QPixelLayout extern ConvertAndStorePixelsFunc64 qStoreFromRGBA64PM[QImage::NImageFormats]; -#if QT_CONFIG(raster_fp) +#if 0 extern ConvertToFPFunc qConvertToRGBA32F[QImage::NImageFormats]; extern FetchAndConvertPixelsFuncFP qFetchToRGBA32F[QImage::NImageFormats]; extern ConvertAndStorePixelsFuncFP qStoreFromRGBA32F[QImage::NImageFormats]; diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index 1a04ef74f88..fb7e3cdbf94 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -1803,7 +1803,7 @@ void tst_QImage::smoothScale2_data() QImage::Format_RGBX64, QImage::Format_RGBA64_Premultiplied, #endif -#if QT_CONFIG(raster_fp) +#if 0 QImage::Format_RGBX32FPx4, QImage::Format_RGBA32FPx4_Premultiplied, #endif @@ -1969,7 +1969,7 @@ void tst_QImage::smoothScale4_data() #if 0 QTest::newRow("RGBx64") << QImage::Format_RGBX64; #endif -#if QT_CONFIG(raster_fp) +#if 0 QTest::newRow("RGBx32FP") << QImage::Format_RGBX32FPx4; #endif } diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index b6b9d312966..910560c74e2 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -282,7 +282,7 @@ private slots: void drawImageAtPointF(); void scaledDashes(); -#if QT_CONFIG(raster_fp) +#if 0 void hdrColors(); #endif @@ -5500,7 +5500,7 @@ void tst_QPainter::scaledDashes() QVERIFY(backFound); } -#if QT_CONFIG(raster_fp) +#if 0 void tst_QPainter::hdrColors() { QImage img(10, 10, QImage::Format_RGBA32FPx4_Premultiplied);