From 0459b572b32a09baa1d1eed0f803a2a525b35903 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 16 Sep 2022 15:43:30 +0200 Subject: [PATCH] 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. Fixes: QTBUG-101236 Change-Id: I8e4ee67f53093b7f81e014b28d8a028ba2ddcc47 Reviewed-by: Eirik Aavitsland (cherry picked from commit 0e90bdbaa43b05a0c0711c78c749bb8379efa755) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 041169c775d..1a677ad4452 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);