From 45a2f5a8286d9884fdf1161c09da5807c0528481 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 9 Aug 2016 09:36:26 +0100 Subject: [PATCH] Don't delete gl texture twice in thumbnail The QSGTextures are created with window()->createTextureFromId(m_texture, QSize(w,h), QuickWindow::TextureOwnsGLTexture)); this means we don't want to be deleting textures ourselves too, it will be deleted when we delete the QSGTexture, which is a scoped pointer inside our QSGNode. BUG: 355644 BUG: 365946 REVIEW: 126131 --- src/declarativeimports/core/windowthumbnail.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarativeimports/core/windowthumbnail.cpp b/src/declarativeimports/core/windowthumbnail.cpp index 6c46789b1..d10699431 100644 --- a/src/declarativeimports/core/windowthumbnail.cpp +++ b/src/declarativeimports/core/windowthumbnail.cpp @@ -276,7 +276,7 @@ bool WindowThumbnail::windowToTextureGLX(WindowTextureNode *textureNode) return false; } - textureNode->reset(window()->createTextureFromId(m_texture, QSize(geo->width, geo->height), QQuickWindow::TextureOwnsGLTexture)); + textureNode->reset(window()->createTextureFromId(m_texture, QSize(geo->width, geo->height))); } textureNode->texture()->bind(); bindGLXTexture(); @@ -325,7 +325,7 @@ bool WindowThumbnail::xcbWindowToTextureEGL(WindowTextureNode *textureNode) size.setWidth(geo->width); size.setHeight(geo->height); } - textureNode->reset(window()->createTextureFromId(m_texture, size, QQuickWindow::TextureOwnsGLTexture)); + textureNode->reset(window()->createTextureFromId(m_texture, size)); } textureNode->texture()->bind(); bindEGLTexture();