summaryrefslogtreecommitdiff
path: root/src/hardwareintegration/compositor/vulkan-server
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-25 12:53:51 +0200
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-28 13:43:57 +0100
commit143fd7c785361a27712e812e70dca788b831d1b3 (patch)
tree92d5b8e883fbb136f33b14a88b2cfbad6749cea1 /src/hardwareintegration/compositor/vulkan-server
parent3215181e9285e34c2bef788d36b50a9ec9ef87ec (diff)
downloadqtwayland-143fd7c785361a27712e812e70dca788b831d1b3.tar.gz
Compositor: Warn and clean up when server buffer integrations fail
Makes it consistent with how client buffer integrations work. Also doesn't leave partially initialized integration around for the compositor to use. Change-Id: I6ff898639b958f62330879a2eff1acbc7e5cdb1f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/hardwareintegration/compositor/vulkan-server')
-rw-r--r--src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp3
-rw-r--r--src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp b/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp
index 79dc6211..602e25f7 100644
--- a/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.cpp
@@ -265,11 +265,12 @@ VulkanServerBufferIntegration::~VulkanServerBufferIntegration()
{
}
-void VulkanServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor)
+bool VulkanServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor)
{
Q_ASSERT(QGuiApplication::platformNativeInterface());
QtWaylandServer::zqt_vulkan_server_buffer_v1::init(compositor->display(), 1);
+ return true;
}
bool VulkanServerBufferIntegration::supportsFormat(QtWayland::ServerBuffer::Format format) const
diff --git a/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.h b/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.h
index df020f8a..6e2c51dd 100644
--- a/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.h
+++ b/src/hardwareintegration/compositor/vulkan-server/vulkanserverbufferintegration.h
@@ -86,7 +86,7 @@ public:
VulkanWrapper *vulkanWrapper() const { return m_vulkanWrapper; }
- void initializeHardware(QWaylandCompositor *) override;
+ bool initializeHardware(QWaylandCompositor *) override;
bool supportsFormat(QtWayland::ServerBuffer::Format format) const override;
QtWayland::ServerBuffer *createServerBufferFromImage(const QImage &qimage, QtWayland::ServerBuffer::Format format) override;