diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-04-04 17:45:28 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-02 14:20:55 +0000 |
commit | 648ee7aa020d04b160ec56187f49f761ffab93cc (patch) | |
tree | 3d68cc7feb1393c26259ea92f52f4e3fba99fb0d /src/gui/painting/qdrawhelper_p.h | |
parent | 6a39e49a6cdeb28a04a3657bb6a22f848d5dfa9d (diff) |
Merge drawhelper convert-from and store
Avoids using an intermediate buffer on store and simplifies the code.
Change-Id: I2dc4e735eb770f90dc99fe0f513b4df3b35ee793
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting/qdrawhelper_p.h')
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 35c8baf0de..bddd6899e3 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -1227,11 +1227,15 @@ struct QDitherInfo { int y; }; -typedef const uint *(QT_FASTCALL *ConvertFunc)(uint *buffer, const uint *src, int count, - const QVector<QRgb> *clut, QDitherInfo *dither); +typedef const uint *(QT_FASTCALL *FetchAndConvertPixelsFunc)(uint *buffer, const uchar *src, int index, int count, + const QVector<QRgb> *clut, QDitherInfo *dither); +typedef void (QT_FASTCALL *ConvertAndStorePixelsFunc)(uchar *dest, const uint *src, int index, int count, + const QVector<QRgb> *clut, QDitherInfo *dither); + +typedef void (QT_FASTCALL *ConvertFunc)(uint *buffer, int count, const QVector<QRgb> *clut); typedef const QRgba64 *(QT_FASTCALL *ConvertFunc64)(QRgba64 *buffer, const uint *src, int count, const QVector<QRgb> *clut, QDitherInfo *dither); -typedef const uint *(QT_FASTCALL *RbSwapFunc)(uint *buffer, const uint *src, int count); +typedef void (QT_FASTCALL *RbSwapFunc)(uchar *dst, const uchar *src, int count); struct QPixelLayout @@ -1253,17 +1257,13 @@ struct QPixelLayout BPP bpp; RbSwapFunc rbSwap; ConvertFunc convertToARGB32PM; - ConvertFunc convertFromARGB32PM; - ConvertFunc convertFromRGB32; ConvertFunc64 convertToARGB64PM; + FetchAndConvertPixelsFunc fetchToARGB32PM; + ConvertAndStorePixelsFunc storeFromARGB32PM; + ConvertAndStorePixelsFunc storeFromRGB32; }; -typedef const uint *(QT_FASTCALL *FetchPixelsFunc)(uint *buffer, const uchar *src, int index, int count); -typedef void (QT_FASTCALL *StorePixelsFunc)(uchar *dest, const uint *src, int index, int count); - extern QPixelLayout qPixelLayouts[QImage::NImageFormats]; -extern const FetchPixelsFunc qFetchPixels[QPixelLayout::BPPCount]; -extern StorePixelsFunc qStorePixels[QPixelLayout::BPPCount]; extern MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3]; |