Remove old dead code

Nothing references this, not even commented out debug code, and some
functions doesn't even have implementations.

Change-Id: I344de26a650b1180f0da78eaece5bd5688fdcd95
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Allan Sandfeld Jensen 2018-11-29 11:01:09 +01:00
parent 484eec96f9
commit b179abc33b
4 changed files with 0 additions and 103 deletions

View File

@ -552,35 +552,6 @@ bool QRasterPaintEngine::end()
return true; return true;
} }
/*!
\internal
*/
void QRasterPaintEngine::releaseBuffer()
{
Q_D(QRasterPaintEngine);
d->rasterBuffer.reset(new QRasterBuffer);
}
/*!
\internal
*/
QSize QRasterPaintEngine::size() const
{
Q_D(const QRasterPaintEngine);
return QSize(d->rasterBuffer->width(), d->rasterBuffer->height());
}
/*!
\internal
*/
#ifndef QT_NO_DEBUG
void QRasterPaintEngine::saveBuffer(const QString &s) const
{
Q_D(const QRasterPaintEngine);
d->rasterBuffer->bufferImage().save(s, "PNG");
}
#endif
/*! /*!
\internal \internal
*/ */
@ -3845,11 +3816,6 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
return format; return format;
} }
void QRasterBuffer::resetBuffer(int val)
{
memset(m_buffer, val, m_height*bytes_per_line);
}
QClipData::QClipData(int height) QClipData::QClipData(int height)
{ {
clipSpanHeight = height; clipSpanHeight = height;
@ -4272,48 +4238,6 @@ static void qt_span_clip(int count, const QSpan *spans, void *userData)
} }
} }
#ifndef QT_NO_DEBUG
QImage QRasterBuffer::bufferImage() const
{
QImage image(m_width, m_height, QImage::Format_ARGB32_Premultiplied);
for (int y = 0; y < m_height; ++y) {
uint *span = (uint *)const_cast<QRasterBuffer *>(this)->scanLine(y);
for (int x=0; x<m_width; ++x) {
uint argb = span[x];
image.setPixel(x, y, argb);
}
}
return image;
}
#endif
void QRasterBuffer::flushToARGBImage(QImage *target) const
{
int w = qMin(m_width, target->width());
int h = qMin(m_height, target->height());
for (int y=0; y<h; ++y) {
uint *sourceLine = (uint *)const_cast<QRasterBuffer *>(this)->scanLine(y);
QRgb *dest = (QRgb *) target->scanLine(y);
for (int x=0; x<w; ++x) {
QRgb pixel = sourceLine[x];
int alpha = qAlpha(pixel);
if (!alpha) {
dest[x] = 0;
} else {
dest[x] = (alpha << 24)
| ((255*qRed(pixel)/alpha) << 16)
| ((255*qGreen(pixel)/alpha) << 8)
| ((255*qBlue(pixel)/alpha) << 0);
}
}
}
}
class QGradientCache class QGradientCache
{ {
public: public:

View File

@ -208,15 +208,6 @@ public:
ClipType clipType() const; ClipType clipType() const;
QRect clipBoundingRect() const; QRect clipBoundingRect() const;
void releaseBuffer();
QSize size() const;
#ifndef QT_NO_DEBUG
void saveBuffer(const QString &s) const;
#endif
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
void setDC(HDC hdc); void setDC(HDC hdc);
HDC getDC() const; HDC getDC() const;
@ -442,20 +433,9 @@ public:
void init(); void init();
QImage::Format prepare(QImage *image); QImage::Format prepare(QImage *image);
QImage::Format prepare(QPixmap *pix);
void prepare(int w, int h);
void prepareBuffer(int w, int h);
void resetBuffer(int val=0);
uchar *scanLine(int y) { Q_ASSERT(y>=0); Q_ASSERT(y<m_height); return m_buffer + y * bytes_per_line; } uchar *scanLine(int y) { Q_ASSERT(y>=0); Q_ASSERT(y<m_height); return m_buffer + y * bytes_per_line; }
#ifndef QT_NO_DEBUG
QImage bufferImage() const;
#endif
void flushToARGBImage(QImage *image) const;
int width() const { return m_width; } int width() const { return m_width; }
int height() const { return m_height; } int height() const { return m_height; }
int bytesPerLine() const { return bytes_per_line; } int bytesPerLine() const { return bytes_per_line; }

View File

@ -310,12 +310,6 @@ bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *wi
return store->scroll(tlwRect, dx, dy); return store->scroll(tlwRect, dx, dy);
} }
void QWidgetBackingStore::releaseBuffer()
{
if (store)
store->resize(QSize());
}
/*! /*!
Prepares the window surface to paint a\ toClean region of the \a widget and Prepares the window surface to paint a\ toClean region of the \a widget and
updates the BeginPaintInfo struct accordingly. updates the BeginPaintInfo struct accordingly.

View File

@ -151,7 +151,6 @@ private:
void doSync(); void doSync();
bool bltRect(const QRect &rect, int dx, int dy, QWidget *widget); bool bltRect(const QRect &rect, int dx, int dy, QWidget *widget);
void releaseBuffer();
void beginPaint(QRegion &toClean, QWidget *widget, QBackingStore *backingStore, void beginPaint(QRegion &toClean, QWidget *widget, QBackingStore *backingStore,
BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates = true); BeginPaintInfo *returnInfo, bool toCleanIsInTopLevelCoordinates = true);