From 53dff95bfbe9070c4cd17045f3d5147f29710c5f Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 24 Aug 2018 14:16:29 +0200 Subject: Compositor: Fix OpenGL textures deleted prematurely [ChangeLog][Compositor] Fixed a bug where destroying a WaylandQuickItem would delete the OpenGL texture for all other WaylandQuickItems using that surface. The texture QWaylandBufferRef::toOpenGLTexture returns is owned by the buffer (documented public API), so setting QQuickWindow::TextureOwnsGLTexture in QWaylandTextureProvider is wrong. Task-number: QTBUG-70163 Change-Id: I831f2aa81ed20c08d4d87bccac33650ab86d19c8 Reviewed-by: Paul Olav Tvete --- src/compositor/compositor_api/qwaylandquickitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index c61d84d6c..1ee6848e3 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -288,7 +288,7 @@ public: m_sgTex->bind(); } } else { - QQuickWindow::CreateTextureOptions opt = QQuickWindow::TextureOwnsGLTexture; + QQuickWindow::CreateTextureOptions opt; QWaylandQuickSurface *surface = qobject_cast(surfaceItem->surface()); if (surface && surface->useTextureAlpha()) { opt |= QQuickWindow::TextureHasAlphaChannel; -- cgit v1.2.3