qt5base-lts/tests/auto
Laszlo Agocs 244daf4cfc Fix rhi flush eval perf. and native window problems
This effectively reverts a4a51f6a64
while solving the problem that change intended to fix by an
alternative approach: Swap the order of checks for rhi-based
flushing. Checking the widgets' wishes first was a mistake.  We should
first check what is forced, e.g. via the env.vars.  Then only move on
investigating the child widget hierarchy if there was nothing specific
requested.

This way having a QOpenGLWidget in a window and running with
QT_WIDGETS_RHI=1 QT_WIDGETS_RHI_BACKEND=vulkan will prioritize the
forced request (Vulkan) and so the QOpenGLWidget will gracefully not
render anything while printing the expected warning to tell what's
going on.

The expensive recursion plaguing the construction of larger widget
hierarchies is now avoided, that should no longer take seconds due to
walking the entire widget hierarchy of the top-level window every time
a new widget is added to it.

However, this then uncovered a set of problems concerning native child
widgets. The repaint manager seems to have an obvious mistake where
the usage of rhi (and so textures and whatnot) is decided based on
'widget' (which is either a top-level or a native child) instead of
'tlw' (which is the top-level with the backingstore). The usesRhiFlush
flag only really matters for a real top-level, not for native child
widgets.  The rhi-based flushing is tied to the backingstore, and the
backingstore comes from the top-level widget.

Finally, make the qopenglwidget autotest to actually exercise
something when it comes to QOpenGLWidgets (or their ancestors) turned
native.  The original code from a long time ago does not really test
native child widgets, because it turns the top-level into native which
is quite superfluous since the toplevel is backed by a native window
(and a backingstore) anyway.

Pick-to: 6.4
Task-number: QTBUG-105017
Fixes: QTBUG-108344
Fixes: QTBUG-108277
Change-Id: I1785b0ca627cf151aad06a5489f63874d787f087
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-14 11:05:48 +01:00
..
bic/data Add binary compatibility file generated against 6.4.0 2022-11-09 13:18:42 +03:00
cmake tests: fix configuring with -no-feature-gui 2022-10-29 01:04:09 +02:00
concurrent Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
corelib Add more tests of QLocale and "single character" data that aren't 2022-11-11 16:32:53 +01:00
dbus Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
gui emit QWindow::windowStateChanged only when state has changed 2022-11-11 11:21:32 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Windows: Inform accessibility system about the focused child item 2022-11-11 10:21:32 +00:00
printsupport Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
testlib Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
tools Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
wasm Fix typo in QWasmWindowStack's name 2022-10-20 16:36:23 +02:00
widgets Fix rhi flush eval perf. and native window problems 2022-11-14 11:05:48 +01:00
xml Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00