const-ify DestFetchProc function prototypes argument

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-07-31 21:30:19 -04:00
parent 4905a80beb
commit 9ad8927a1c
2 changed files with 7 additions and 7 deletions

View file

@ -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 <class DST>
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<const DST*>(rasterBuffer->scanLine(y)) + x;

View file

@ -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);