Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.2
-
None
-
-
02bf4d06b (dev), 91cae3f9c (dev), 920060606 (6.8), 1e6950fd7 (6.8), 6b598235b (dev)
Description
QML applications in both Windows and Android have a big input latency on 60 Hz screens, creating a worse UX for users than what is offered by Qt Widgets on Windows or native apps on Android. You can reproduce the problem easily by compiling the qml file below, then moving the mouse around the screen and seeing that the rectangle lags behind the mouse. I wasn't able to reproduce the same issue on macOS though, where the rectangle keeps up fairly close with the mouse movement (why isn't it a problem on macOS?). If you disable VSync, the problem goes way, so the issue might be caused by the VSync blocking the render thread, which will in turn block the UI thread and stall event processing; but disabling VSync is not an option since animations will stop running smoothly and we could introduce tearing.
What we could do instead is to introduce the APIs for VSync synchronization native to each platform - IDXGIOutput::WaitForVBlank on Windows and Choreographer on Android - to solve the animation issues and disable vsync if the system compositor already solves the tearing issue.
import QtQml.Models import QtQuick import QtQuick.Window import QtQuick.Controls import QtQuick.Layouts Window { id: window visible: true width: 640 height: 480 title: "QtQuickApplication1" Rectangle { color: "gray" width: 40 height: 40 x: ma.point.position.x - width / 2 y: ma.point.position.y - height / 2 } HoverHandler { id: ma } }
Attachments
Issue Links
- relates to
-
QTBUG-99304 Scrolling with a touchpad on Windows is very laggy
- Reported
- mentioned in
-
Page Loading...
Gerrit Reviews
For Gerrit Dashboard: QTBUG-127267 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
577322,13 | WIP: rhi: d3d11: Wait in beginFrame with a max latency of 2 | dev | qt/qtbase | Status: DEFERRED | 0 | 0 |
577391,7 | rhi: d3d12: Also default to max frame latency 2 | dev | qt/qtbase | Status: MERGED | +2 | 0 |
577699,4 | rhi: d3d11: Wait in beginFrame with a max latency of 2 | dev | qt/qtbase | Status: MERGED | +2 | 0 |
580642,2 | rhi: d3d11: Wait in beginFrame with a max latency of 2 | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
580643,2 | rhi: d3d12: Also default to max frame latency 2 | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
582752,34 | d3d: Drive window updates from a vblank watcher thread | dev | qt/qtbase | Status: MERGED | +2 | 0 |
584606,1 | WIP: rhi: d3d: vsync experiment, alternative, version 3 | dev | qt/qtbase | Status: DEFERRED | -2 | 0 |