Fixed RenderTask bug when source actor is off-stage. 78/24078/1
authorPaul Wisbey <p.wisbey@samsung.com>
Fri, 13 Jun 2014 11:36:28 +0000 (20:36 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 13:15:27 +0000 (14:15 +0100)
[problem]      If a render-once RenderTask's source actor is off-stage, this will cause Dali to render continuously.
[cause]        The RenderTask is waiting, but not ready to render.
[solution]     Change update logic to only keepUpdating if a waiting task is ready.

Change-Id: I8f6e400a4f19ba731460bcda7e9ea83bd3593268
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
dali/internal/update/manager/update-manager.cpp

index d9a4d6a..0b9b72e 100644 (file)
@@ -1146,7 +1146,8 @@ unsigned int UpdateManager::Update( float elapsedSeconds, unsigned int lastVSync
   {
     RenderTask& renderTask(*(*iter));
 
-    if( renderTask.IsWaitingToRender() )
+    if( renderTask.IsWaitingToRender() &&
+        renderTask.ReadyToRender(mSceneGraphBuffers.GetUpdateBufferIndex()) /*avoid updating forever when source actor is off-stage*/ )
     {
       mImpl->renderTaskWaiting = true; // keep update/render threads alive
     }