diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-01-14 15:13:42 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-01-15 19:28:54 +0000 |
commit | 978131ba7106df99e010f5ea5559204424f29ab7 (patch) | |
tree | 062ea83ae5bb161e7d73a310f4c96513a9dc5fea /src/gui | |
parent | d96f00286cd570d70d9e8829e665a38928aefc20 (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)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpixellayout.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/painting/qpixellayout.cpp b/src/gui/painting/qpixellayout.cpp index 0b1e736ec8..3b05e98318 100644 --- a/src/gui/painting/qpixellayout.cpp +++ b/src/gui/painting/qpixellayout.cpp @@ -783,9 +783,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 QList<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; } |