summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-08-24 14:16:29 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-08-28 07:01:00 +0000
commit53dff95bfbe9070c4cd17045f3d5147f29710c5f (patch)
tree9f1ce31f3c8d3b8bb6dd6ce3b772133d6f5003c2
parent048fa7f52cbfee1351e5c2d6420f438fa733106e (diff)
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 <paul.tvete@qt.io>
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp2
1 files changed, 1 insertions, 1 deletions
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<QWaylandQuickSurface *>(surfaceItem->surface());
if (surface && surface->useTextureAlpha()) {
opt |= QQuickWindow::TextureHasAlphaChannel;