Bind texture in WaylandSurfaceItem::updateTexture
authorAndy Nichols <andy.nichols@nokia.com>
Mon, 4 Jun 2012 11:10:51 +0000 (13:10 +0200)
committerAndy Nichols <andy.nichols@nokia.com>
Mon, 4 Jun 2012 11:35:40 +0000 (13:35 +0200)
This avoids a race condition where we delete the
resource behind the texture before we get a chance
to upload it.

Change-Id: I19d126ecf3fcb5141c6630cd8e783647ea6a779c
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/compositor/compositor_api/waylandsurfaceitem.cpp

index e042125..854d727 100644 (file)
@@ -349,6 +349,7 @@ void WaylandSurfaceItem::updateTexture()
         } else {
             texture = canvas()->createTextureFromImage(m_surface->image());
         }
+        texture->bind();
         delete oldTexture;
     }