diff options
| author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 16:57:12 +0100 |
|---|---|---|
| committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 16:57:27 +0100 |
| commit | a1dbdcbd6e818118f5fc28cdd39e47a02380adbd (patch) | |
| tree | 0d813d9d72baeb1b5f7be048e775896c73f134f5 /src/plugins/platforms/eglfs/api/qeglfsintegration.cpp | |
| parent | 67ea445f09db9feea4e863faa12c45fb007f53a4 (diff) | |
| parent | 4cbadf699838406d14366ce61deec03cf45113f7 (diff) | |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
src/corelib/Qt5CoreConfigExtras.cmake.in
src/corelib/Qt5CoreMacros.cmake
src/dbus/Qt5DBusConfigExtras.cmake.in
src/widgets/Qt5WidgetsConfigExtras.cmake.in
Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
Diffstat (limited to 'src/plugins/platforms/eglfs/api/qeglfsintegration.cpp')
| -rw-r--r-- | src/plugins/platforms/eglfs/api/qeglfsintegration.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp index d9a3545a956..e26d984cc1f 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp @@ -247,6 +247,13 @@ QPlatformOffscreenSurface *QEglFSIntegration::createPlatformOffscreenSurface(QOf } #endif // QT_NO_OPENGL +#if QT_CONFIG(vulkan) +QPlatformVulkanInstance *QEglFSIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const +{ + return qt_egl_device_integration()->createPlatformVulkanInstance(instance); +} +#endif + bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) const { // We assume that devices will have more and not less capabilities @@ -283,7 +290,8 @@ enum ResourceType { NativeDisplay, XlibDisplay, WaylandDisplay, - EglSurface + EglSurface, + VkSurface }; static int resourceType(const QByteArray &key) @@ -296,7 +304,8 @@ static int resourceType(const QByteArray &key) QByteArrayLiteral("nativedisplay"), QByteArrayLiteral("display"), QByteArrayLiteral("server_wl_display"), - QByteArrayLiteral("eglsurface") + QByteArrayLiteral("eglsurface"), + QByteArrayLiteral("vksurface") }; const QByteArray *end = names + sizeof(names) / sizeof(names[0]); const QByteArray *result = std::find(names, end, key); @@ -364,6 +373,12 @@ void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWi if (window && window->handle()) result = reinterpret_cast<void*>(static_cast<QEglFSWindow *>(window->handle())->surface()); break; +#if QT_CONFIG(vulkan) + case VkSurface: + if (window && window->handle() && window->surfaceType() == QSurface::VulkanSurface) + result = static_cast<QEglFSWindow *>(window->handle())->vulkanSurfacePtr(); + break; +#endif default: break; } |
