Go to file
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
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Minor fixes for qt-configure-module 2022-06-27 17:55:19 +02:00
cmake Use module-specific names for 'module_headers[_generated]' files 2022-11-10 19:29:52 +01:00
coin Add support of Android multi-ABI builds 2022-11-04 18:39:03 +01:00
config.tests Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Doc: Add a dark offline CSS 2022-11-11 18:48:50 +02:00
examples QMessageBox: Don't add details button to native dialog helper 2022-11-11 17:48:50 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
LICENSES Add license text file for Creative Commons Zero (CC0) 1.0 2022-10-19 12:06:09 +02:00
mkspecs Add permission API backend for macOS and iOS 2022-11-03 15:02:36 +01:00
qmake Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
src Fix rhi flush eval perf. and native window problems 2022-11-14 11:05:48 +01:00
tests Fix rhi flush eval perf. and native window problems 2022-11-14 11:05:48 +01:00
util LocaleDB: Make passing qtbase root dir on command-lines optional 2022-11-01 19:14:14 +02:00
.cmake.conf Replace the syncqt.pl script with syncqt tool 2022-09-27 13:12:11 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
conanfile.py Conan: Do not force 'qt_host_path' usage in cross-build context 2022-06-22 18:18:42 +03:00
config_help.txt Add -disable-deprecated-up-to parameter to configure script 2022-08-19 23:52:05 +02:00
configure Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.bat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.cmake wasm: add support for enabling wasm excptions 2022-11-03 12:22:50 +00:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
qt_cmdline.cmake QCryptographicHash: implement OpenSSL 3.0 support 2022-09-26 17:26:37 +02:00
sync.profile Move qurltlds_p.h out of src/network, and make it a .cpp file 2022-10-01 06:24:51 +00:00