summaryrefslogtreecommitdiffstats
path: root/src/core/compositor/compositor.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2022-10-27 14:33:16 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2022-11-10 09:42:16 +0100
commitb32f5e5b495ef73f25d3156d24a83fffd33f02be (patch)
tree5651504ad55f3609163c85879e0ac6d726c6db27 /src/core/compositor/compositor.h
parent6fb80f47941b555f1a9455d3bd3d189b90092b60 (diff)
Add Vulkan rendering support
Updates 3rdparty: * 8b7ce4ef70d Make GrVkImage external Task-number: QTBUG-107669 Change-Id: If7fbe1f20538598dd1d4f3a67be17c9f7d06a3cd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/compositor/compositor.h')
-rw-r--r--src/core/compositor/compositor.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/compositor/compositor.h b/src/core/compositor/compositor.h
index 9cadab4d4..7c6590134 100644
--- a/src/core/compositor/compositor.h
+++ b/src/core/compositor/compositor.h
@@ -4,10 +4,16 @@
#ifndef COMPOSITOR_H
#define COMPOSITOR_H
+#include <QtGui/qtguiglobal.h>
#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h>
+#if QT_CONFIG(webengine_vulkan)
+#include <QVulkanInstance>
+#endif
+
QT_BEGIN_NAMESPACE
class QImage;
+class QQuickWindow;
class QSize;
QT_END_NAMESPACE
@@ -31,6 +37,7 @@ public:
enum class Type {
Software,
OpenGL,
+ Vulkan,
};
// Identifies a compositor.
@@ -139,6 +146,17 @@ public:
// (OpenGL) Texture of the frame.
virtual int textureId();
+#if QT_CONFIG(webengine_vulkan)
+ // (Vulkan) VkImage of the frame.
+ virtual VkImage vkImage(QQuickWindow *win);
+
+ // (Vulkan) Layout for vkImage().
+ virtual VkImageLayout vkImageLayout();
+
+ // (Vulkan) Release Vulkan resources created by Qt's Vulkan instance.
+ virtual void releaseVulkanResources(QQuickWindow *win);
+#endif
+
protected:
Compositor(Type type) : m_type(type) { }
virtual ~Compositor() { if (m_binding) unbind(); }