{
mImpl->scenes.back()->scene = scene.Release();
+ // Set root to the Scene
+ mImpl->scenes.back()->scene->SetRoot(mImpl->scenes.back()->root);
+
// Initialize the context from render manager
typedef MessageValue1<RenderManager, SceneGraph::Scene*> DerivedType;
}
}
+void UpdateManager::UpdateLayers(BufferIndex bufferIndex)
+{
+ for(auto&& scene : mImpl->scenes)
+ {
+ if(scene && scene->root)
+ {
+ SceneGraph::UpdateLayerTree(*scene->root, bufferIndex);
+ }
+ }
+}
+
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();
mImpl->frameCallbackProcessor->Update(bufferIndex, elapsedSeconds);
}
- //Update node hierarchy, apply constraints and perform sorting / culling.
- //This will populate each Layer with a list of renderers which are ready.
+ //Update node hierarchy, apply constraints,
UpdateNodes(bufferIndex);
//Apply constraints to RenderTasks, shaders
mImpl->nodeDirtyFlags |= NodePropertyFlags::TRANSFORM;
}
+ //Initialise layer renderable reuse
+ UpdateLayers(bufferIndex);
+
//Process Property Notifications
ProcessPropertyNotifications(bufferIndex);
}
}
- 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());
- }
}
}