diff options
| author | Cathy Park <cathy.park@lge.com> | 2021-10-15 17:35:26 +0900 |
|---|---|---|
| committer | Cathy Park <cathy.park@lge.com> | 2022-01-03 16:46:38 +0900 |
| commit | 05fefdbf57817aa0c6dd840813f52ed2c49fceef (patch) | |
| tree | 380300ad1adda8f8b9ffbaa8c65f17b4b198f290 /src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp | |
| parent | 1a2e499e0e05a03460f4335d5266be485f97d3fa (diff) | |
client: Add waitForFrameSync for Vulkan
Frames are processed by mFrameQueue in Qtwayand. However, in vulkan
backend, frames are sent by handleUpdate() but waitForFrameSync()
is not called which should handle frames in mFrameQueue.
For the current vulkan backend, frames are only handled by drivers
like mesa. So in the current vulkan backend, some particular animations
don't run or are slow because frames sent by qtwayland are not being
handled.
Fixes: QTBUG-96222
Change-Id: Ifbab385ca619ef9461104eb8bd778f17093a56b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: YoungSun Park <cathy.park@lge.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp')
| -rw-r--r-- | src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp b/src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp index 5edbd4757d6..51802257490 100644 --- a/src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp +++ b/src/plugins/platforms/wayland/qwaylandvulkaninstance.cpp @@ -124,6 +124,16 @@ void QWaylandVulkanInstance::presentAboutToBeQueued(QWindow *window) qWarning() << "Attempted to call presentAboutToBeQueued() without a valid platform window"; return; } + + bool ok; + int frameCallbackTimeout = qEnvironmentVariableIntValue("QT_WAYLAND_FRAME_CALLBACK_TIMEOUT", &ok); + + if (ok) + mFrameCallbackTimeout = frameCallbackTimeout; + + if (w->format().swapInterval() > 0) + w->waitForFrameSync(mFrameCallbackTimeout); + w->handleUpdate(); } |
