diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-01-15 23:34:36 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-01-24 09:14:46 +0100 |
commit | 625a0d57aff2c0f42c832eabcc123778e0374922 (patch) | |
tree | 5ed6577b6263110628cd2231b9a768c3a74ab4ee /src/gui | |
parent | c6ec8488305feedde5e605ef76677b2348cb68d4 (diff) |
Fix convertToRGBA64PM for Grayscale16
The input has been fetch into a set of uint32s, so no longer a
string of ushorts.
Fixes: QTBUG-90246
Change-Id: Id52a6824317b0744310008cc2ce2f726539b4c8c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit ade24763c74ce506276218ec1ce0e307301717fe)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 7b3fffcceb..1c8b0cbf4b 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -887,9 +887,8 @@ static const uint *QT_FASTCALL fetchGrayscale16ToRGB32(uint *buffer, const uchar static const QRgba64 *QT_FASTCALL convertGrayscale16ToRGBA64(QRgba64 *buffer, const uint *src, int count, const QVector<QRgb> *, QDitherInfo *) { - const unsigned short *s = reinterpret_cast<const unsigned short *>(src); for (int i = 0; i < count; ++i) - buffer[i] = QRgba64::fromRgba64(s[i], s[i], s[i], 65535); + buffer[i] = QRgba64::fromRgba64(src[i], src[i], src[i], 65535); return buffer; } |