Fix to do not update state of render task in case of uploadOnly
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.cpp
index 02ce60f..e5b96d0 100644 (file)
@@ -899,7 +899,8 @@ uint32_t UpdateManager::Update(float    elapsedSeconds,
                                uint32_t lastVSyncTimeMilliseconds,
                                uint32_t nextVSyncTimeMilliseconds,
                                bool     renderToFboEnabled,
-                               bool     isRenderingToFbo)
+                               bool     isRenderingToFbo,
+                               bool     uploadOnly)
 {
   const BufferIndex bufferIndex = mSceneGraphBuffers.GetUpdateBufferIndex();
 
@@ -1047,36 +1048,39 @@ uint32_t UpdateManager::Update(float    elapsedSeconds,
     }
   }
 
-  for(auto&& scene : mImpl->scenes)
+  if(!uploadOnly)
   {
-    if(scene && scene->root && scene->taskList)
+    for(auto&& scene : mImpl->scenes)
     {
-      RenderTaskList::RenderTaskContainer& tasks = scene->taskList->GetTasks();
-
-      // check the countdown and notify
-      bool doRenderOnceNotify  = false;
-      mImpl->renderTaskWaiting = false;
-      for(auto&& renderTask : tasks)
+      if(scene && scene->root && scene->taskList)
       {
-        renderTask->UpdateState();
+        RenderTaskList::RenderTaskContainer& tasks = scene->taskList->GetTasks();
 
-        if(renderTask->IsWaitingToRender() &&
-           renderTask->ReadyToRender(bufferIndex) /*avoid updating forever when source actor is off-stage*/)
+        // check the countdown and notify
+        bool doRenderOnceNotify  = false;
+        mImpl->renderTaskWaiting = false;
+        for(auto&& renderTask : tasks)
         {
-          mImpl->renderTaskWaiting = true; // keep update/render threads alive
+          renderTask->UpdateState();
+
+          if(renderTask->IsWaitingToRender() &&
+             renderTask->ReadyToRender(bufferIndex) /*avoid updating forever when source actor is off-stage*/)
+          {
+            mImpl->renderTaskWaiting = true; // keep update/render threads alive
+          }
+
+          if(renderTask->HasRendered())
+          {
+            doRenderOnceNotify = true;
+          }
         }
 
-        if(renderTask->HasRendered())
+        if(doRenderOnceNotify)
         {
-          doRenderOnceNotify = true;
+          DALI_LOG_INFO(gRenderTaskLogFilter, Debug::General, "Notify a render task has finished\n");
+          mImpl->notificationManager.QueueCompleteNotification(scene->taskList->GetCompleteNotificationInterface());
         }
       }
-
-      if(doRenderOnceNotify)
-      {
-        DALI_LOG_INFO(gRenderTaskLogFilter, Debug::General, "Notify a render task has finished\n");
-        mImpl->notificationManager.QueueCompleteNotification(scene->taskList->GetCompleteNotificationInterface());
-      }
     }
   }