From 21aeb562bfbb0b078bc75c040def7b868c6d1aae Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 27 Sep 2020 21:37:27 +0300 Subject: [PATCH] re-use variable in destStoreARGB32() drawing helper Signed-off-by: Ivailo Monev --- src/gui/painting/qdrawhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 49aa6d5bb..ae765e032 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -241,7 +241,7 @@ static void QT_FASTCALL destStoreARGB32(QRasterBuffer *rasterBuffer, int x, int else if (alpha == 0) data[i] = 0; else { - int inv_alpha = 0xff0000/qAlpha(buffer[i]); + int inv_alpha = 0xff0000/alpha; data[i] = (p & 0xff000000) | ((qRed(p)*inv_alpha) & 0xff0000) | (((qGreen(p)*inv_alpha) >> 8) & 0xff00) -- 2.11.0