diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index 236323f2d..3365e0cf7 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -229,16 +229,14 @@ void QWidgetBackingStore::releaseBuffer() } /*! - Prepares the window surface to paint a\ toClean region of the \a widget and - updates the BeginPaintInfo struct accordingly. + Prepares the window surface to paint a\ toClean region and updates the + BeginPaintInfo struct accordingly. The \a toClean region might be clipped by the window surface. */ -void QWidgetBackingStore::beginPaint(QRegion &toClean, QWidget *widget, QWindowSurface *windowSurface, +void QWidgetBackingStore::beginPaint(QRegion &toClean, QWindowSurface *windowSurface, BeginPaintInfo *returnInfo) { - Q_UNUSED(widget); - // Always flush repainted areas. dirtyOnScreen += toClean; @@ -1035,7 +1033,7 @@ void QWidgetBackingStore::sync() #ifndef Q_BACKINGSTORE_SUBSURFACES BeginPaintInfo beginPaintInfo; - beginPaint(toClean, tlw, windowSurface, &beginPaintInfo); + beginPaint(toClean, windowSurface, &beginPaintInfo); if (beginPaintInfo.nothingToPaint) { for (int i = 0; i < opaqueNonOverlappedWidgets.size(); ++i) resetWidget(opaqueNonOverlappedWidgets[i]); @@ -1071,7 +1069,7 @@ void QWidgetBackingStore::sync() QPoint off = w->mapTo(tlw, QPoint()); toBePainted.translate(off); - beginPaint(toBePainted, w, subSurface, &beginPaintInfo, true); + beginPaint(toBePainted, subSurface, &beginPaintInfo); toBePainted.translate(-off); if (beginPaintInfo.nothingToPaint) @@ -1129,7 +1127,7 @@ void QWidgetBackingStore::sync() toClean = dirtyCopy; BeginPaintInfo beginPaintInfo; - beginPaint(toClean, w, subSurface, &beginPaintInfo); + beginPaint(toClean, subSurface, &beginPaintInfo); if (beginPaintInfo.nothingToPaint) continue; diff --git a/src/gui/painting/qbackingstore_p.h b/src/gui/painting/qbackingstore_p.h index 19c7efd8d..056d510c3 100644 --- a/src/gui/painting/qbackingstore_p.h +++ b/src/gui/painting/qbackingstore_p.h @@ -109,8 +109,7 @@ private: bool bltRect(const QRect &rect, int dx, int dy, QWidget *widget); void releaseBuffer(); - void beginPaint(QRegion &toClean, QWidget *widget, QWindowSurface *windowSurface, - BeginPaintInfo *returnInfo); + void beginPaint(QRegion &toClean, QWindowSurface *windowSurface, BeginPaintInfo *returnInfo); void endPaint(const QRegion &cleaned, QWindowSurface *windowSurface, BeginPaintInfo *beginPaintInfo); QRegion dirtyRegion(QWidget *widget = 0) const;