From 7ddc0e5fb477a9bacb4093878fb0ab0d083b7e3f Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Fri, 17 Jul 2009 03:25:06 -0700 Subject: Remove unused function in QDirectFBPaintEngine drawColorSpan is never called from anywhere so we might as well get rid of the code. Reviewed-by: TrustMe --- .../gfxdrivers/directfb/qdirectfbpaintengine.cpp | 32 ---------------------- .../gfxdrivers/directfb/qdirectfbpaintengine.h | 2 -- 2 files changed, 34 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 305d5beec6..2245acc563 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -672,38 +672,6 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color) } } -void QDirectFBPaintEngine::drawColorSpans(const QSpan *spans, int count, - uint color) -{ - Q_D(QDirectFBPaintEngine); - color = INV_PREMUL(color); - - QVarLengthArray lines(count); - int j = 0; - for (int i = 0; i < count; ++i) { - if (spans[i].coverage == 255) { - lines[j].x1 = spans[i].x; - lines[j].y1 = spans[i].y; - lines[j].x2 = spans[i].x + spans[i].len - 1; - lines[j].y2 = spans[i].y; - ++j; - } else { - DFBSpan span = { spans[i].x, spans[i].len }; - uint c = BYTE_MUL(color, spans[i].coverage); - // ### how does this play with setDFBColor - d->surface->SetColor(d->surface, - qRed(c), qGreen(c), qBlue(c), qAlpha(c)); - d->surface->FillSpans(d->surface, spans[i].y, &span, 1); - } - } - if (j > 0) { - d->surface->SetColor(d->surface, - qRed(color), qGreen(color), qBlue(color), - qAlpha(color)); - d->surface->DrawLines(d->surface, lines.data(), j); - } -} - void QDirectFBPaintEngine::drawBufferSpan(const uint *buffer, int bufsize, int x, int y, int length, uint const_alpha) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h index 8c5877b83c..e57fcc9555 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.h @@ -78,11 +78,9 @@ public: void drawPixmap(const QRectF &r, const QPixmap &pixmap, const QRectF &sr); void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr); - void drawColorSpans(const QSpan *spans, int count, uint color); void drawBufferSpan(const uint *buffer, int bufsize, int x, int y, int length, uint const_alpha); - // The following methods simply lock the surface & call the base implementation void stroke(const QVectorPath &path, const QPen &pen); void drawPath(const QPainterPath &path); -- cgit v1.2.3