Restore part of a bug-fix lost during a merge conflict
authorRahul Singhal <rasinghal@nvidia.com>
Thu, 22 Sep 2011 10:31:40 +0000 (16:01 +0530)
committerMichael Schuldt <michael.schuldt@bmw-carit.de>
Tue, 4 Oct 2011 07:17:14 +0000 (09:17 +0200)
Part of a bug-fix to eliminate race concditions in platform surface allocation
was lost during the merge commit 74815133d6b9f42d8e6c170979f01631e9151ac9.
This change restores the same.

Change-Id: Iab62cf1c74eab8c5d227f7bde8f259cf8e65e666
Reviewed-on: http://git-embedded-01.nvidia.com/r/4855
Reviewed-by: Adam Cheney <acheney@nvidia.com>
Tested-by: Rahul Singhal <rasinghal@nvidia.com>
LayerManagerPlugins/Renderers/Graphic/src/WindowSystems/X11WindowSystem.cpp

index 53e417a..d7bb526 100644 (file)
@@ -202,6 +202,7 @@ Surface* X11WindowSystem::getSurfaceForWindow(Window w)
 
 void X11WindowSystem::checkForNewSurface()
 {
+    m_pScene->lockScene();
     LayerList layers = m_pScene->getCurrentRenderOrder();
     for(LayerListConstIterator current = layers.begin(); current != layers.end(); current++)
     {
@@ -211,6 +212,7 @@ void X11WindowSystem::checkForNewSurface()
             allocatePlatformSurface(*currentS);
         }
     }
+    m_pScene->unlockScene();
 }
 
 void X11WindowSystem::configureSurfaceWindow(Window window)