OSDN Git Service

remove unused drawing function prototypes
authorIvailo Monev <xakepa10@laimg.moc>
Mon, 9 Mar 2020 15:42:00 +0000 (15:42 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Mon, 9 Mar 2020 15:42:00 +0000 (15:42 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/gui/painting/qdrawhelper_p.h
src/gui/painting/qpaintengine_raster.cpp
src/gui/painting/qpaintengine_raster_p.h

index 1e6bf67..a699c9b 100644 (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)
index f674bca..5f20999 100644 (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,
index 656af35..f121f7d 100644 (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();