From 430591673d9d8adebd9039f78bc60b819c0c6135 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20R=C3=B8dal?= Date: Thu, 12 May 2011 10:49:10 +0200 Subject: [PATCH] Fixed missing texture updates. Make sure we get a new texture id, so that QSGSimpleTextureNode::setTexture() doesn't return early. --- src/qt-compositor/compositor_api/waylandsurfaceitem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp index 772fb31..9281831 100644 --- a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp +++ b/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp @@ -51,8 +51,7 @@ 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(), @@ -61,6 +60,8 @@ void WaylandSurfaceItem::surfaceDamaged(const QRect &) m_texture = canvas()->sceneGraphEngine()->createTextureFromImage(m_surface->image()); } + delete oldTexture; + emit textureChanged(); } -- 2.7.4