Make sure we get a new texture id, so that
QSGSimpleTextureNode::setTexture() doesn't return early.
void WaylandSurfaceItem::surfaceDamaged(const QRect &)
{
- if (m_texture)
- delete m_texture;
+ QSGTexture *oldTexture = m_texture;
if (m_surface->type() == WaylandSurface::Texture) {
m_texture = canvas()->sceneGraphEngine()->createTextureFromId(m_surface->texture(),
m_texture = canvas()->sceneGraphEngine()->createTextureFromImage(m_surface->image());
}
+ delete oldTexture;
+
emit textureChanged();
}