diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2019-03-21 11:42:15 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2019-03-21 11:57:15 +0100 |
commit | 77e8ee63dc9ad0a4c139f35f8cf078d1a5bd315c (patch) | |
tree | 499f94df98fc25bca2982fba4dd67457f42bd6b9 /src/hardwareintegration | |
parent | df3a1761af2f20d59ae09a7adaa2f5b959047687 (diff) | |
parent | c0905957be0d7db90c9d9f05069a259575753dfe (diff) |
Merge remote-tracking branch 'qt/5.13' into dev
Change-Id: I3dc204fcaa71c01a80b0c622443012eb07964431
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 1 | ||||
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index 6455b6fa9..13b78241d 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -145,6 +145,7 @@ public: } void blit(QWaylandEglWindow *window) { + Q_ASSERT(window->wlSurface()); QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context()); QSize surfaceSize = window->surfaceSize(); diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index 2cadf8503..88dab2ab2 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -186,6 +186,7 @@ public: EGLDisplay egl_display = EGL_NO_DISPLAY; bool valid = false; bool display_bound = false; + ::wl_display *wlDisplay = nullptr; QOffscreenSurface *offscreenSurface = nullptr; QOpenGLContext *localContext = nullptr; QVector<QOpenGLTexture *> orphanedTextures; @@ -394,6 +395,12 @@ WaylandEglClientBufferIntegration::WaylandEglClientBufferIntegration() WaylandEglClientBufferIntegration::~WaylandEglClientBufferIntegration() { WaylandEglClientBufferIntegrationPrivate::shuttingDown = true; + Q_D(WaylandEglClientBufferIntegration); + if (d->egl_unbind_wayland_display && d->display_bound) { + Q_ASSERT(d->wlDisplay); + if (!d->egl_unbind_wayland_display(d->egl_display, d->wlDisplay)) + qWarning() << "Qt Wayland Compositor: eglUnbindWaylandDisplayWL failed"; + } } void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display) @@ -450,6 +457,7 @@ void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di qWarning("QtCompositor: Could not bind Wayland display. Ignoring."); } } + d->wlDisplay = display; } d->funcs = new QEGLStreamConvenience; |