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
This commit is contained in:
David Edmundson 2016-08-09 09:36:26 +01:00 committed by David Edmundson
parent 7364377a06
commit 45a2f5a828

View File

@ -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();