summaryrefslogtreecommitdiffstats
path: root/src/webenginequick/api/qtwebenginequickglobal.cpp
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/webenginequick/api/qtwebenginequickglobal.cpp
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/webenginequick/api/qtwebenginequickglobal.cpp')
-rw-r--r--src/webenginequick/api/qtwebenginequickglobal.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/webenginequick/api/qtwebenginequickglobal.cpp b/src/webenginequick/api/qtwebenginequickglobal.cpp
index 607777e55..b16305dae 100644
--- a/src/webenginequick/api/qtwebenginequickglobal.cpp
+++ b/src/webenginequick/api/qtwebenginequickglobal.cpp
@@ -43,9 +43,12 @@ void initialize()
QtWebEngineCore::initialize();
return;
}
+
// call initialize the same way as widgets do
qAddPreRoutine(QtWebEngineCore::initialize);
- QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
+ auto api = QQuickWindow::graphicsApi();
+ if (api != QSGRendererInterface::OpenGLRhi && api != QSGRendererInterface::VulkanRhi)
+ QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi);
}
} // namespace QtWebEngineQuick