summaryrefslogtreecommitdiff
path: root/src/gui/vulkan/qvulkaninstance.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-04 14:49:30 +0200
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-08 12:16:51 +0200
commit7a3d647bab633caae270a74d8a398669bbfe8521 (patch)
tree402ea9f113de23afe03d37f22dc9b1ea34689678 /src/gui/vulkan/qvulkaninstance.cpp
parent1ed9cc2a93a1b5215b5ad149d9698aa970d1756a (diff)
downloadqtbase-7a3d647bab633caae270a74d8a398669bbfe8521.tar.gz
Vulkan: Add platform hooks before presenting
This allows the Wayland plugin to circumvent the frame callback handling of the driver (which blocks until the frame is presented, potentially forever, if the window is minimized). Task-number: QTBUG-78000 Change-Id: Ia7d347019dfeae3bfcfad3d0cca3f4fffdc8c7a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/vulkan/qvulkaninstance.cpp')
-rw-r--r--src/gui/vulkan/qvulkaninstance.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/vulkan/qvulkaninstance.cpp b/src/gui/vulkan/qvulkaninstance.cpp
index 0605d88cca..daf37e3dc8 100644
--- a/src/gui/vulkan/qvulkaninstance.cpp
+++ b/src/gui/vulkan/qvulkaninstance.cpp
@@ -775,6 +775,20 @@ bool QVulkanInstance::supportsPresent(VkPhysicalDevice physicalDevice, uint32_t
}
/*!
+ This function should be called by the application's renderer before queuing
+ a present operation for \a window.
+
+ While on some platforms this will be a no-op, some may perform windowing
+ system dependent synchronization. For example, on Wayland this will
+ add send a wl_surface.frame request in order to prevent the driver from
+ blocking for minimized windows.
+ */
+void QVulkanInstance::presentAboutToBeQueued(QWindow *window)
+{
+ d_ptr->platformInst->presentAboutToBeQueued(window);
+}
+
+/*!
This function should be called by the application's renderer after queuing
a present operation for \a window.