qt5base-lts/tests/manual
Laszlo Agocs f814cc6a79 rhi: metal: Switch back to presentDrawable
This convenience should be, according to the Apple docs, equivalent to
calling present from a scheduled handler. (which on its own makes it
unclear why we switched in the first place)

In practice it seems the two approaches are not identical. It looks
like that once a frame is submitted earlier than the next display link
callback, the throttling behavior we implement in beginFrame()
(waiting on the semaphore for the completion of the appropriate
command list etc.) starts exhibiting unexpected behavior, not
correctly throttling the thread to the refresh rate. Changing back to
presentDrawable does not exhibit this at all.

The suspicion is that presentDrawable is probably doing more than what
the docs suggest, and so is not fully equivalent to calling present
manually from a scheduled handler.

Therefore, switch to presentDrawable now, which restores the expected
cross-platform behavior, but make a note of the oddity, and also
prepare the hellominimalcrossgfxtriangle manual test to provide an
easy, self-contained application to allow experimenting in the future,
if needed.

This allows Qt Quick render thread animations to advance at the
expected speed (because the render thread is correctly throttled to
the refresh rate), even if the render thread decides to generate a new
frame right away, without waiting for the next display link update.

Without this patch, attempting to get updates not via requestUpdate(),
but by other means (timer etc.) leads to incorrect throttling, and so
the triangle in the test app is rotating faster than expected - but
only with Metal. Running with OpenGL on macOS or with any API on any
other platform the behavior will be correct. Even if scheduling
updates without display link is not efficient, and should be
discouraged, not doing so cannot break the core contract of vsync
throttling, i.e. the thread cannot run faster just because it renders
a frame not in response to an UpdateRequest.

Amends 98b60450f7 (effectively reverts
but keeps the code and the notes because we might want to clear this
up some day)

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-103415
Change-Id: Id3bd43e94785384142337564ce4b2644bf257100
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-06-28 10:47:41 +02:00
..
cmake/test_copy_file_if_different_command Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
cocoa Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
corelib/tools Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
diaglib Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
dialogs Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
embeddedintoforeignwindow Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
filetest Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
foreignwindows Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
gestures Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
highdpi Add support for painting at integer DPR with downscale 2022-06-14 19:16:35 +00:00
inputmethodhints Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
keypadnavigation Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
lance Support cosmetic brush patterns in the pdf and opengl paint engines 2022-06-04 21:15:42 +02:00
markdown Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
mkspecs Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
network_remote_stresstest Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
network_stresstest Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qcursor Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qdesktopservices Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsitem Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicsitemgroup Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qgraphicslayout/flicker Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qhttpnetworkconnection Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qimagereader Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qlayout Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qlocale Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmetatype Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qmimedatabase Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnetconmonitor Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnetworkaccessmanager/qget Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnetworkinformation Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnetworkreply Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qopenglcontext Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qopengltextureblitter Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qopenglwidget Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qopenglwindow/multiwindow Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qprintdevice_dump Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qscreen Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qscreen_xrandr Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qssloptions Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsslsocket Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstorageinfo Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsysinfo Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qt_poll Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtabbar Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtabletevent Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtbug-8933 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtbug-52641 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtexteditlist Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtexttableborders Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtouchevent Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qvulkaninstance Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwidget_zorder Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
repaint Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
rhi rhi: metal: Switch back to presentDrawable 2022-06-28 10:47:41 +02:00
shortcuts Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
socketengine Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
startsystemmove Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
textrendering Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
touch Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
touchGraphicsItem Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
transientwindow Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
triangulator Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
unc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
wasm wasm: Improve wheel event handling 2022-05-24 03:10:10 +02:00
widgetgrab Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
widgets Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
windowactivation Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
windowchildgeometry Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
windowflags Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
windowgeometry Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
windowmodality Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
windowtransparency Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
xcb_gl_integration Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
xembed-raster Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
xembed-widgets Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
CMakeLists.txt xcb: support xrandr(1.5) monitor setup 2021-09-01 20:32:04 +02:00
manual.pro xcb: support xrandr(1.5) monitor setup 2021-09-01 20:32:04 +02:00