diff options
Diffstat (limited to 'src/widgets/kernel/qwidgetbackingstore.cpp')
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 57564ce477..bb421927db 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -77,11 +77,10 @@ Q_GLOBAL_STATIC(QPlatformTextureList, qt_dummy_platformTextureList) /** * Flushes the contents of the \a backingStore into the screen area of \a widget. - * \a tlwOffset is the position of the top level widget relative to the window surface. * \a region is the region to be updated in \a widget coordinates. */ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBackingStore *backingStore, - QWidget *tlw, const QPoint &tlwOffset, QPlatformTextureList *widgetTextures, + QWidget *tlw, QPlatformTextureList *widgetTextures, QWidgetBackingStore *widgetBackingStore) { #ifdef QT_NO_OPENGL @@ -112,7 +111,7 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion ®ion, QBack } } - QPoint offset = tlwOffset; + QPoint offset; if (widget != tlw) offset += widget->mapTo(tlw, QPoint()); @@ -288,8 +287,7 @@ void QWidgetBackingStore::unflushPaint(QWidget *widget, const QRegion &rgn) if (!tlwExtra) return; - const QPoint offset = widget->mapTo(tlw, QPoint()); - qt_flush(widget, rgn, tlwExtra->backingStoreTracker->store, tlw, offset, 0, tlw->d_func()->maybeBackingStore()); + qt_flush(widget, rgn, tlwExtra->backingStoreTracker->store, tlw, 0, tlw->d_func()->maybeBackingStore()); } #endif // QT_NO_PAINT_DEBUG @@ -299,7 +297,7 @@ void QWidgetBackingStore::unflushPaint(QWidget *widget, const QRegion &rgn) */ bool QWidgetBackingStore::bltRect(const QRect &rect, int dx, int dy, QWidget *widget) { - const QPoint pos(tlwOffset + widget->mapTo(tlw, rect.topLeft())); + const QPoint pos(widget->mapTo(tlw, rect.topLeft())); const QRect tlwRect(QRect(pos, rect.size())); if (dirty.intersects(tlwRect)) return false; // We don't want to scroll junk. @@ -949,9 +947,7 @@ static void findTextureWidgetsRecursively(QWidget *tlw, QWidget *widget, QPlatfo { QWidgetPrivate *wd = QWidgetPrivate::get(widget); if (wd->renderToTexture) { - QPlatformTextureList::Flags flags = 0; - if (widget->testAttribute(Qt::WA_AlwaysStackOnTop)) - flags |= QPlatformTextureList::StacksOnTop; + QPlatformTextureList::Flags flags = wd->textureListFlags(); const QRect rect(widget->mapTo(tlw, QPoint()), widget->size()); widgetTextures->appendTexture(widget, wd->textureId(), rect, wd->clipRect(), flags); } @@ -1123,7 +1119,7 @@ void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedReg // Nothing to repaint. if (!isDirty() && store->size().isValid()) { QPlatformTextureList *tl = widgetTexturesFor(tlw, exposedWidget); - qt_flush(exposedWidget, tl ? QRegion() : exposedRegion, store, tlw, tlwOffset, tl, this); + qt_flush(exposedWidget, tl ? QRegion() : exposedRegion, store, tlw, tl, this); return; } @@ -1369,7 +1365,7 @@ void QWidgetBackingStore::doSync() QRegion toBePainted(wd->dirty); resetWidget(w); - QPoint offset(tlwOffset); + QPoint offset; if (w != tlw) offset += w->mapTo(tlw, QPoint()); wd->drawWidget(store->paintDevice(), toBePainted, offset, flags, 0, this); @@ -1378,7 +1374,7 @@ void QWidgetBackingStore::doSync() // Paint the rest with composition. if (repaintAllWidgets || !dirtyCopy.isEmpty()) { const int flags = QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawRecursive; - tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, tlwOffset, flags, 0, this); + tlw->d_func()->drawWidget(store->paintDevice(), dirtyCopy, QPoint(), flags, 0, this); } endPaint(toClean, store, &beginPaintInfo); @@ -1397,7 +1393,7 @@ void QWidgetBackingStore::flush(QWidget *widget) // Flush the region in dirtyOnScreen. if (!dirtyOnScreen.isEmpty()) { QWidget *target = widget ? widget : tlw; - qt_flush(target, dirtyOnScreen, store, tlw, tlwOffset, widgetTexturesFor(tlw, tlw), this); + qt_flush(target, dirtyOnScreen, store, tlw, widgetTexturesFor(tlw, tlw), this); dirtyOnScreen = QRegion(); flushed = true; } @@ -1409,7 +1405,7 @@ void QWidgetBackingStore::flush(QWidget *widget) QPlatformTextureList *tl = widgetTexturesFor(tlw, tlw); if (tl) { QWidget *target = widget ? widget : tlw; - qt_flush(target, QRegion(), store, tlw, tlwOffset, tl, this); + qt_flush(target, QRegion(), store, tlw, tl, this); } } #endif @@ -1423,7 +1419,7 @@ void QWidgetBackingStore::flush(QWidget *widget) QWidgetPrivate *wd = w->d_func(); Q_ASSERT(wd->needsFlush); QPlatformTextureList *widgetTexturesForNative = wd->textureChildSeen ? widgetTexturesFor(tlw, w) : 0; - qt_flush(w, *wd->needsFlush, store, tlw, tlwOffset, widgetTexturesForNative, this); + qt_flush(w, *wd->needsFlush, store, tlw, widgetTexturesForNative, this); *wd->needsFlush = QRegion(); } dirtyOnScreenWidgets->clear(); |