summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-05-23 12:41:01 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-05-23 12:37:34 +0000
commit1937a4e8b9b729e62426ce3018cc0a96a0c40972 (patch)
treeffe6135fcfd4f358b129405701d1bedf94201d6b /src/widgets/kernel
parentbdb1c18e411a1660f038e4f0e219d363d38e987a (diff)
Add a workaround for render-to-texture widgets in fullscreen windows
The performance optimization of falling back to flushing windows the normal (raster) way once no render-to-texture widgets are visible has issues with fullscreen windows, presumably due to the compositor's special handling of such windows. Disable our smartness and stick with composeAndFlush for ever in case the window is fullscreen. Change-Id: Ifb31e0d36bd0a3933fcfe55a9a7d502513d6e3cf Task-number: QTBUG-53515 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 8269bd13f6..049ed248de 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -1000,8 +1000,18 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget)
static bool switchableWidgetComposition =
QGuiApplicationPrivate::instance()->platformIntegration()
->hasCapability(QPlatformIntegration::SwitchableWidgetComposition);
- if (!switchableWidgetComposition)
+ if (!switchableWidgetComposition
+// The Windows compositor handles fullscreen OpenGL window specially. Besides
+// having trouble with popups, it also has issues with flip-flopping between
+// OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen
+// windows. (QTBUG-53515)
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE)
+ || tlw->windowState().testFlag(Qt::WindowFullScreen)
+#endif
+ )
+ {
return qt_dummy_platformTextureList();
+ }
}
return 0;