From 650aa0be9e1515227d620c07b8604912296f416a Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 27 Jan 2021 20:24:40 +0200 Subject: [PATCH] implement DestStoreProc for Format_RGB32 and Format_ARGB32_Premultiplied Signed-off-by: Ivailo Monev --- src/gui/painting/qdrawhelper.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 9e00b6850..479093b36 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -239,6 +239,12 @@ static void QT_FASTCALL destStoreARGB32(QRasterBuffer *rasterBuffer, int x, int } } +static void QT_FASTCALL destStoreRGB32(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) +{ + quint32 *data = (quint32*)rasterBuffer->scanLine(y) + x; + ::memcpy(data, buffer, length * sizeof(quint32)); +} + static void QT_FASTCALL destStoreRGB16(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length) { quint16 *data = (quint16*)rasterBuffer->scanLine(y) + x; @@ -251,9 +257,9 @@ static DestStoreProc destStoreProc[QImage::NImageFormats] = destStoreMono, // Format_Mono, destStoreMonoLsb, // Format_MonoLSB 0, // Format_Indexed8 - 0, // Format_RGB32 + destStoreRGB32, // Format_RGB32 destStoreARGB32, // Format_ARGB32, - 0, // Format_ARGB32_Premultiplied + destStoreRGB32, // Format_ARGB32_Premultiplied destStoreRGB16, // Format_RGB16 }; -- 2.11.0