From: Ivailo Monev Date: Thu, 16 Dec 2021 21:21:29 +0000 (+0200) Subject: adjust QPainter benchmark X-Git-Tag: 4.12.0~1458 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=07b32b9be06ab1bb874874cfb9a90ee033500aeb;p=kde%2FKatie.git adjust QPainter benchmark Signed-off-by: Ivailo Monev --- diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp index 4a0614afc..fff3f9f1f 100644 --- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp @@ -725,7 +725,7 @@ void tst_QPainter::compositionModes_data() QTest::addColumn("size"); QTest::addColumn("color"); - const int n = QPainter::RasterOp_SourceAndNotDestination; + const int n = QPainter::CompositionMode_Exclusion; for (int i = 0; i <= n; ++i) { QString title("%1:%2"); QTest::newRow(qPrintable(title.arg(i).arg("10x10:opaque"))) @@ -753,8 +753,7 @@ void tst_QPainter::compositionModes() src.fill(color); QPixmap dest = rasterPixmap(size); - if (mode < QPainter::RasterOp_SourceOrDestination) - color.setAlpha(127); // porter-duff needs an alpha channel + color.setAlpha(127); // porter-duff needs an alpha channel dest.fill(color); QPainter p(&dest);