From 9ad8927a1c605a1ff94c0f6f09e09cf26742ec16 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 31 Jul 2020 21:30:19 -0400 Subject: [PATCH] const-ify DestFetchProc function prototypes argument Signed-off-by: Ivailo Monev --- src/gui/painting/qdrawhelper.cpp | 12 ++++++------ src/gui/painting/qdrawhelper_p.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 12b83c144..6122c6f55 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -922,7 +922,7 @@ inline void blend_sourceOver_4(qargb6666 *dest, const qargb6666 *src) transformations */ -static uint * QT_FASTCALL destFetchMono(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) +static uint * QT_FASTCALL destFetchMono(uint *buffer, const QRasterBuffer *rasterBuffer, int x, int y, int length) { const uchar *data = (const uchar *)rasterBuffer->scanLine(y); uint *start = buffer; @@ -935,7 +935,7 @@ static uint * QT_FASTCALL destFetchMono(uint *buffer, QRasterBuffer *rasterBuffe return start; } -static uint * QT_FASTCALL destFetchMonoLsb(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) +static uint * QT_FASTCALL destFetchMonoLsb(uint *buffer, const QRasterBuffer *rasterBuffer, int x, int y, int length) { const uchar *data = (const uchar *)rasterBuffer->scanLine(y); uint *start = buffer; @@ -948,7 +948,7 @@ static uint * QT_FASTCALL destFetchMonoLsb(uint *buffer, QRasterBuffer *rasterBu return start; } -static uint * QT_FASTCALL destFetchARGB32(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) +static uint * QT_FASTCALL destFetchARGB32(uint *buffer, const QRasterBuffer *rasterBuffer, int x, int y, int length) { const uint *data = (const uint *)rasterBuffer->scanLine(y) + x; for (int i = 0; i < length; ++i) @@ -956,12 +956,12 @@ static uint * QT_FASTCALL destFetchARGB32(uint *buffer, QRasterBuffer *rasterBuf return buffer; } -static uint * QT_FASTCALL destFetchARGB32P(uint *, QRasterBuffer *rasterBuffer, int x, int y, int) +static uint * QT_FASTCALL destFetchARGB32P(uint *, const QRasterBuffer *rasterBuffer, int x, int y, int) { return (uint *)rasterBuffer->scanLine(y) + x; } -static uint * QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length) +static uint * QT_FASTCALL destFetchRGB16(uint *buffer, const QRasterBuffer *rasterBuffer, int x, int y, int length) { const ushort *data = (const ushort *)rasterBuffer->scanLine(y) + x; for (int i = 0; i < length; ++i) @@ -970,7 +970,7 @@ static uint * QT_FASTCALL destFetchRGB16(uint *buffer, QRasterBuffer *rasterBuff } template -static uint * QT_FASTCALL destFetch(uint *buffer, QRasterBuffer *rasterBuffer, +static uint * QT_FASTCALL destFetch(uint *buffer, const QRasterBuffer *rasterBuffer, int x, int y, int length) { const DST *src = reinterpret_cast(rasterBuffer->scanLine(y)) + x; diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index 41d1d7a93..883d748d4 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -127,7 +127,7 @@ struct RadialGradientValues }; struct Operator; -typedef uint* (QT_FASTCALL *DestFetchProc)(uint *buffer, QRasterBuffer *rasterBuffer, int x, int y, int length); +typedef uint* (QT_FASTCALL *DestFetchProc)(uint *buffer, const QRasterBuffer *rasterBuffer, int x, int y, int length); typedef void (QT_FASTCALL *DestStoreProc)(QRasterBuffer *rasterBuffer, int x, int y, const uint *buffer, int length); typedef const uint* (QT_FASTCALL *SourceFetchProc)(uint *buffer, const Operator *o, const QSpanData *data, int y, int x, int length); -- 2.11.0