summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetbackingstore.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-21 08:17:21 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-21 08:17:21 +0100
commit158a3a4159bdc5a49caecd63e021dacbc06cf23c (patch)
treec3ed9aee6cabd46e5e8615b3815b92d32857c4da /src/widgets/kernel/qwidgetbackingstore.cpp
parent26ece94a68fb5ae680c5639716b06c4e1ae979a8 (diff)
parent7b2fb038ae4b8b9231ae989ad309b6eca107a858 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
Diffstat (limited to 'src/widgets/kernel/qwidgetbackingstore.cpp')
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 98e3d32996..e6dc579f67 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -1085,7 +1085,8 @@ void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedReg
// Nothing to repaint.
if (!isDirty() && store->size().isValid()) {
- qt_flush(exposedWidget, exposedRegion, store, tlw, tlwOffset, widgetTexturesFor(tlw, tlw), this);
+ QPlatformTextureList *tl = widgetTexturesFor(tlw, exposedWidget);
+ qt_flush(exposedWidget, tl ? QRegion() : exposedRegion, store, tlw, tlwOffset, tl, this);
return;
}
@@ -1256,9 +1257,17 @@ void QWidgetBackingStore::doSync()
for (int i = 0; i < paintPending.count(); ++i) {
QWidget *w = paintPending[i];
w->d_func()->sendPaintEvent(w->rect());
- QWidget *npw = w->nativeParentWidget();
- if (w->internalWinId() || (npw && npw != tlw))
- markDirtyOnScreen(w->rect(), w, w->mapTo(tlw, QPoint()));
+ if (w != tlw) {
+ QWidget *npw = w->nativeParentWidget();
+ if (w->internalWinId() || (npw && npw != tlw)) {
+ if (!w->internalWinId())
+ w = npw;
+ QWidgetPrivate *wPrivate = w->d_func();
+ if (!wPrivate->needsFlush)
+ wPrivate->needsFlush = new QRegion;
+ appendDirtyOnScreenWidget(w);
+ }
+ }
}
// We might have newly exposed areas on the screen if this function was
@@ -1283,13 +1292,8 @@ void QWidgetBackingStore::doSync()
}
}
}
- for (int i = 0; i < dirtyRenderToTextureWidgets.count(); ++i) {
- QWidget *w = dirtyRenderToTextureWidgets.at(i);
- resetWidget(w);
- QWidget *npw = w->nativeParentWidget();
- if (w->internalWinId() || (npw && npw != tlw))
- markDirtyOnScreen(w->rect(), w, w->mapTo(tlw, QPoint()));
- }
+ for (int i = 0; i < dirtyRenderToTextureWidgets.count(); ++i)
+ resetWidget(dirtyRenderToTextureWidgets.at(i));
dirtyRenderToTextureWidgets.clear();
#endif