diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-12-06 10:42:59 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-12-09 01:22:15 +0100 |
commit | a09c33e1f7b5999a16bce9dd23ef8ca33d519210 (patch) | |
tree | 8022306b99335272d168982454c4fd5fb4efb88e /src/gui/painting | |
parent | 2e514f85111ec1ecd8b6f6a5c48edcf43647a006 (diff) |
Fix wrong to linear conversion
Causing bad rendering of gamma corrected text on non-standard image
format paint devices.
Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-109169
Change-Id: I6d95e9a42b9ccac609071123dd4535d25e225a29
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qcolortrclut_p.h | 1 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qcolortrclut_p.h b/src/gui/painting/qcolortrclut_p.h index 1b312d4a78..c6b73d9f69 100644 --- a/src/gui/painting/qcolortrclut_p.h +++ b/src/gui/painting/qcolortrclut_p.h @@ -82,6 +82,7 @@ public: return QRgba64::fromRgba64(r, g, b, qAlpha(rgb32) * 257); #endif } + QRgba64 toLinear64(QRgba64) const = delete; QRgb toLinear(QRgb rgb32) const { diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 91813971f1..91d8c424d1 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -5613,7 +5613,7 @@ static inline void alphargbblend_argb32(quint32 *dst, uint coverage, const QRgba static inline void rgbBlendPixel(QRgba64 &dst, int coverage, QRgba64 slinear, const QColorTrcLut *colorProfile) { // Do a gammacorrected RGB alphablend... - const QRgba64 dlinear = colorProfile ? colorProfile->toLinear64(dst) : dst; + const QRgba64 dlinear = colorProfile ? colorProfile->toLinear(dst) : dst; QRgba64 blend = rgbBlend(dlinear, slinear, coverage); |