qt6-bb10/tests/auto
Tor Arne Vestbø 697e1b0397 Decouple rate-limiting of paint-on-screen widgets from top level widget
As part of eacd58d4e7, a mechanism was
added to prevent posting redundant UpdateRequest events to the top
level widget, managed by QWidgetRepaintManager. The mechanism relied
on a boolean that was set when posting an update request event, and
reset when processing the event for the top level widget, as part
of QWidgetRepaintManager::sync().

However, for paint-on-screen widgets, we don't post an update request
to the top level, we post it to the paint-on-screen widget directly.
And when processing that event, we don't paint the widget though the
normal QWidgetRepaintManager machinery, but instead call the paint
event via QWidgetPrivate::paintOnScreen().

As a result, an update() on a paint-on-screen widget would result
in never receiving updates for non-paint-on-screen widgets, as
we assumed there was no reason to send further update requests.

We could fix this by clearing the updateRequestSent flag as part
of the paintOnScreen() code path, but that's incorrect as the flag
represents whether the top level QWidgetRepaintManager needs an
update request event or not, and would lead to missed updates
to normal widgets until the paint-on-screen widget finishes its
update.

Instead, we only set updateRequestSent if we're posting update
requests for non-paint-on-screen widgets, which in practice
means the top level widget.

The paint on screen logic in QWidgetRepaintManager::markDirty
still takes care of rate-limiting the update requests to the
paint-on-screen widget, by comparing the dirty area of the
widget.

There is definite room for improvement here, especially in the
direction of handling update requests via QWindow::requestUpdate
instead of manually posted events, but for now this will have to
do.

Fixes: QTBUG-80167
Pick-to: 6.7 6.6 6.5 6.2 5.15
Change-Id: Ib5685de7ca2fd7cd7883a25bb7bc0255ea242d30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-04 01:26:56 +02:00
..
bic/data Add binary compatibility file for 6.6.0 2023-10-17 22:23:42 +03:00
cmake "Simplify" versionless targets 2024-03-12 20:27:42 +01:00
concurrent Fix truncation warning in generation_helpers 2024-03-18 20:10:34 +01:00
corelib Add equality comparison between QJsonObject and QJsonValueConstRef 2024-04-03 17:31:36 +00:00
dbus QDBusArgument: disambiguate between QMap on std::pair and std::map 2024-03-18 14:43:13 -07:00
gui Add support for CMYK file I/O in JPEG 2024-04-03 22:15:42 +01:00
guiapplauncher Turn the "concentriccircles" example into snippets, update screenshot 2023-12-14 20:06:32 +01:00
network tst_qnetworkreply: verify we can open the local file for comparison 2024-04-03 23:57:45 +01:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Clean up windows accessibility backend 2024-03-27 15:35:15 +01:00
printsupport Change license for tests files 2024-02-04 09:56:42 +01:00
shared Change license for tests files 2024-02-04 09:56:42 +01:00
sql CMake: Make a few more auto tests standalone 2024-03-14 01:14:18 +01:00
testlib QSignalSpy: separate messages for invalid and non-signal meta-methods 2024-03-22 15:31:39 +01:00
tools Add support for using an inline namespaces for -qtnamespace 2024-04-03 17:17:11 +02:00
wasm wasm: Disable failing selenium test temporarily 2024-04-03 10:11:09 +02:00
widgets Decouple rate-limiting of paint-on-screen widgets from top level widget 2024-04-04 01:26:56 +02:00
xml QtXml: fix leak in QDomText::splitText 2024-03-02 21:22:53 +01:00
CMakeLists.txt wasm: Add qdiriterator test + minor runtime fixes 2024-03-19 10:28:06 +01:00
network-settings.h Change license for tests files 2024-02-04 09:56:42 +01:00