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>
This commit is contained in:
parent
ac4e848c98
commit
5477537327
@ -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 ®ion, 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 ®ion, 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();
|
||||
|
@ -111,8 +111,6 @@ public:
|
||||
void sync();
|
||||
void flush(QWidget *widget = 0);
|
||||
|
||||
inline QPoint topLevelOffset() const { return tlwOffset; }
|
||||
|
||||
QBackingStore *backingStore() const { return store; }
|
||||
|
||||
inline bool isDirty() const
|
||||
@ -138,8 +136,6 @@ private:
|
||||
QBackingStore *store;
|
||||
uint updateRequestSent : 1;
|
||||
|
||||
QPoint tlwOffset;
|
||||
|
||||
QPlatformTextureListWatcher *textureListWatcher;
|
||||
QElapsedTimer perfTime;
|
||||
int perfFrames;
|
||||
@ -149,7 +145,7 @@ private:
|
||||
static bool flushPaint(QWidget *widget, const QRegion &rgn);
|
||||
static void unflushPaint(QWidget *widget, const QRegion &rgn);
|
||||
static void qt_flush(QWidget *widget, const QRegion ®ion, QBackingStore *backingStore,
|
||||
QWidget *tlw, const QPoint &tlwOffset,
|
||||
QWidget *tlw,
|
||||
QPlatformTextureList *widgetTextures,
|
||||
QWidgetBackingStore *widgetBackingStore);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user