remove unused drawing function prototypes

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2020-03-09 15:42:00 +00:00
parent e2db276a13
commit b5ea99e681
3 changed files with 2 additions and 96 deletions

View file

@ -96,28 +96,6 @@ typedef void (*RectFillFunc)(QRasterBuffer *rasterBuffer,
int x, int y, int width, int height,
quint32 color);
typedef void (*SrcOverBlendFunc)(uchar *destPixels, int dbpl,
const uchar *src, int spbl,
int w, int h,
int const_alpha);
typedef void (*SrcOverScaleFunc)(uchar *destPixels, int dbpl,
const uchar *src, int spbl, int srch,
const QRectF &targetRect,
const QRectF &sourceRect,
const QRect &clipRect,
int const_alpha);
typedef void (*SrcOverTransformFunc)(uchar *destPixels, int dbpl,
const uchar *src, int spbl,
const QRectF &targetRect,
const QRectF &sourceRect,
const QRect &clipRect,
const QTransform &targetRectTransform,
int const_alpha);
typedef void (*MemRotateFunc)(const uchar *srcPixels, int w, int h, int sbpl, uchar *destPixels, int dbpl);
struct DrawHelper {
ProcessSpans blendColor;
ProcessSpans blendGradient;
@ -1475,7 +1453,7 @@ qrgb444 qrgb444::byte_mul(quint8 a) const
template <class T>
inline void qt_memfill(T *dest, const T value, int count)
{
memset(dest, value, count);
::memset(dest, value, count);
}
template <class DST, class SRC>
@ -1557,7 +1535,7 @@ inline void qt_memconvert(DST *dest, const SRC *src, int count)
template <> \
inline void qt_memconvert(T *dest, const T *src, int count) \
{ \
memcpy(dest, src, count * sizeof(T)); \
::memcpy(dest, src, count * sizeof(T)); \
}
QT_TRIVIAL_MEMCONVERT_IMPL(quint32)
QT_TRIVIAL_MEMCONVERT_IMPL(qrgb888)

View file

@ -740,75 +740,6 @@ void QRasterPaintEngine::clipEnabledChanged()
}
}
void QRasterPaintEnginePrivate::drawImage(const QPointF &pt,
const QImage &img,
SrcOverBlendFunc func,
const QRect &clip,
int alpha,
const QRect &sr)
{
if (alpha == 0 || !clip.isValid())
return;
Q_ASSERT(img.depth() >= 8);
const int srcBPL = img.bytesPerLine();
const uchar *srcBits = img.constBits();
const int srcSize = img.depth() >> 3; // This is the part that is incompatible with lower than 8-bit..
int iw = img.width();
int ih = img.height();
if (!sr.isEmpty()) {
iw = sr.width();
ih = sr.height();
// Adjust the image according to the source offset...
srcBits += ((sr.y() * srcBPL) + sr.x() * srcSize);
}
// adapt the x parameters
int x = qRound(pt.x());
int cx1 = clip.x();
int cx2 = clip.x() + clip.width();
if (x < cx1) {
int d = cx1 - x;
srcBits += srcSize * d;
iw -= d;
x = cx1;
}
if (x + iw > cx2) {
int d = x + iw - cx2;
iw -= d;
}
if (iw <= 0)
return;
// adapt the y paremeters...
int cy1 = clip.y();
int cy2 = clip.y() + clip.height();
int y = qRound(pt.y());
if (y < cy1) {
int d = cy1 - y;
srcBits += srcBPL * d;
ih -= d;
y = cy1;
}
if (y + ih > cy2) {
int d = y + ih - cy2;
ih -= d;
}
if (ih <= 0)
return;
// call the blend function...
int dstSize = rasterBuffer->bytesPerPixel();
int dstBPL = rasterBuffer->bytesPerLine();
func(rasterBuffer->buffer() + x * dstSize + y * dstBPL, dstBPL,
srcBits, srcBPL,
iw, ih,
alpha);
}
void QRasterPaintEnginePrivate::systemStateChanged()
{
deviceRectUnclipped = QRect(0, 0,

View file

@ -262,9 +262,6 @@ public:
void systemStateChanged();
void drawImage(const QPointF &pt, const QImage &img, SrcOverBlendFunc func,
const QRect &clip, int alpha, const QRect &sr = QRect());
QTransform brushMatrix() const {
Q_Q(const QRasterPaintEngine);
const QRasterPaintEngineState *s = q->state();