summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-16 15:43:30 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-16 21:02:31 +0200
commit0e90bdbaa43b05a0c0711c78c749bb8379efa755 (patch)
tree021c00dd354a6fd0cb2f94b60f52cf7ac0baf6aa /tests/auto/gui/painting/qpainter/tst_qpainter.cpp
parent864fbd65828e0e84e588c896d778ae523a30e97b (diff)
Fix flaky FP32x4 test
The composition implementation may act unexpectedly on Inf or NaN input values. This change avoid those values, without changing the current implementation. Pick-to: 6.4 Fixes: QTBUG-101236 Change-Id: I8e4ee67f53093b7f81e014b28d8a028ba2ddcc47 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/gui/painting/qpainter/tst_qpainter.cpp')
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 041169c775..1a677ad445 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -5506,6 +5506,7 @@ void tst_QPainter::hdrColors()
QCOMPARE(img.pixelColor(4, 4), color);
QImage img2(10, 10, QImage::Format_RGBX32FPx4);
+ img2.fill(Qt::black); // fill to avoid random FP values like Inf which can break SourceOver composition
{
QPainter p(&img2);
p.drawImage(0, 0, img);