summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetbackingstore.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-07-12 14:20:16 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-07-13 22:09:17 +0000
commit5477537327c2ae66159ce2874f1f327c320205cf (patch)
tree156cfcfa3aec0556cb5900b2a0f7a8c2c32ba4cc /src/widgets/kernel/qwidgetbackingstore.cpp
parentac4e848c9802377b7c4ff673180f28b9ca76b746 (diff)
Remove QWidgetBackingStore tlwOffset member variable
It was used in QWS to account for window decorations, but hasn't been set to anything since 2011, when the code that set it was removed in 6ce6b8a3. Change-Id: Ibfd37b37c2055221029341443fb768ad620effa2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidgetbackingstore.cpp')
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 4421218d1d..6b6023953e 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -73,11 +73,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 &region, QBackingStore *backingStore,
- QWidget *tlw, const QPoint &tlwOffset, QPlatformTextureList *widgetTextures,
+ QWidget *tlw, QPlatformTextureList *widgetTextures,
QWidgetBackingStore *widgetBackingStore)
{
#ifdef QT_NO_OPENGL
@@ -108,7 +107,7 @@ void QWidgetBackingStore::qt_flush(QWidget *widget, const QRegion &region, QBack
}
}
- QPoint offset = tlwOffset;
+ QPoint offset;
if (widget != tlw)
offset += widget->mapTo(tlw, QPoint());
@@ -284,8 +283,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
@@ -295,7 +293,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.
@@ -1117,7 +1115,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;
}
@@ -1363,7 +1361,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);
@@ -1372,7 +1370,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);
@@ -1391,7 +1389,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;
}
@@ -1403,7 +1401,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
@@ -1417,7 +1415,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();