Revert "[Tizen] Set RendererAdded value at UpdateStatus"
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 1 Apr 2025 09:41:33 +0000 (18:41 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 1 Apr 2025 09:41:33 +0000 (18:41 +0900)
This reverts commit c75bcbaa51c715088f7f0b8c244943a9b89547c0.

dali/integration-api/core.h
dali/internal/common/core-impl.cpp
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h

index ef5487f06ebfaad8c647f84be51ec438a22244b6..4c3070fdc76460b76d9afd23dc705f0d354b215f 100644 (file)
@@ -107,15 +107,6 @@ public:
     return needsNotification;
   }
 
-  /**
-   * Query whether the Core had added any renderer, or had never added renderer.
-   * @return True if an Core had added any renderer.
-   */
-  bool RendererAdded()
-  {
-    return rendererAdded;
-  }
-
   /**
    * This method is provided so that FPS can be easily calculated with a release version
    * of Core.
@@ -129,7 +120,6 @@ public:
 public:
   uint32_t keepUpdating; ///< A bitmask of KeepUpdating values
   bool     needsNotification;
-  bool     rendererAdded;
   float    secondsFromLastFrame;
 };
 
index a364255aad95bba32389160f783ccd6e1b4e8f5d..0d8bef354709febc9be31221dc800a9d6e733bfc 100644 (file)
@@ -195,7 +195,6 @@ void Core::Update(float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint
   // it is cached by frametime
   status.secondsFromLastFrame = elapsedSeconds;
 
-  static bool rendererAdded = false;
   // Render returns true when there are updates on the stage or one or more animations are completed.
   // Use the estimated time diff till we render as the elapsed time.
   status.keepUpdating = mUpdateManager->Update(elapsedSeconds,
@@ -203,11 +202,7 @@ void Core::Update(float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint
                                                nextVSyncTimeMilliseconds,
                                                renderToFboEnabled,
                                                isRenderingToFbo,
-                                               uploadOnly,
-                                               rendererAdded);
-
-  // Get the value of renderer added from updateManager.
-  status.rendererAdded = rendererAdded;
+                                               uploadOnly);
 
   // Check the Notification Manager message queue to set needsNotification
   status.needsNotification = mNotificationManager->MessagesToProcess();
index 4aa3d794522f79327a2af35901eceb237fd7ec5d..cb1fc4f0d39e39d4e619ea2945404e2f1c51a83d 100644 (file)
@@ -182,11 +182,11 @@ struct UpdateManager::Impl
     {
     }
 
-    ~SceneInfo()               = default;                ///< Default non-virtual destructor
-    SceneInfo(SceneInfo&& rhs) = default;                ///< Move constructor
-    SceneInfo& operator=(SceneInfo&& rhs) = default;     ///< Move assignment operator
-    SceneInfo& operator=(const SceneInfo& rhs) = delete; ///< Assignment operator
-    SceneInfo(const SceneInfo& rhs)            = delete; ///< Copy constructor
+    ~SceneInfo()                               = default; ///< Default non-virtual destructor
+    SceneInfo(SceneInfo&& rhs)                 = default; ///< Move constructor
+    SceneInfo& operator=(SceneInfo&& rhs)      = default; ///< Move assignment operator
+    SceneInfo& operator=(const SceneInfo& rhs) = delete;  ///< Assignment operator
+    SceneInfo(const SceneInfo& rhs)            = delete;  ///< Copy constructor
 
     Layer*                       root{nullptr};   ///< Root node (root is a layer). The layer is not stored in the node memory pool.
     OwnerPointer<RenderTaskList> taskList;        ///< Scene graph render task list
@@ -457,7 +457,8 @@ void UpdateManager::InstallRoot(OwnerPointer<Layer>& layer)
 
   Layer* rootLayer = layer.Release();
 
-  DALI_ASSERT_DEBUG(std::find_if(mImpl->scenes.begin(), mImpl->scenes.end(), [rootLayer](Impl::SceneInfoPtr& scene) { return scene && scene->root == rootLayer; }) == mImpl->scenes.end() &&
+  DALI_ASSERT_DEBUG(std::find_if(mImpl->scenes.begin(), mImpl->scenes.end(), [rootLayer](Impl::SceneInfoPtr& scene)
+                                 { return scene && scene->root == rootLayer; }) == mImpl->scenes.end() &&
                     "Root Node already installed");
 
   rootLayer->CreateTransform(&mImpl->transformManager);
@@ -980,7 +981,8 @@ bool UpdateManager::Animate(BufferIndex bufferIndex, float elapsedSeconds)
 
   auto&& iter = mImpl->animations.Begin();
 
-  DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_ANIMATION_ANIMATE", [&](std::ostringstream& oss) { oss << "[" << mImpl->animations.Count() << "]"; });
+  DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_ANIMATION_ANIMATE", [&](std::ostringstream& oss)
+                                          { oss << "[" << mImpl->animations.Count() << "]"; });
 
   while(iter != mImpl->animations.End())
   {
@@ -1031,7 +1033,8 @@ bool UpdateManager::Animate(BufferIndex bufferIndex, float elapsedSeconds)
     mImpl->notificationManager.QueueNotification(&mImpl->animationPlaylist, std::move(mImpl->notifyRequiredAnimations));
   }
 
-  DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_ANIMATION_ANIMATE", [&](std::ostringstream& oss) { oss << "[" << mImpl->animations.Count() << "]"; });
+  DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_ANIMATION_ANIMATE", [&](std::ostringstream& oss)
+                                        { oss << "[" << mImpl->animations.Count() << "]"; });
 
   return animationActive;
 }
@@ -1126,7 +1129,8 @@ void UpdateManager::UpdateRenderers(PropertyOwnerContainer& postPropertyOwners,
     return;
   }
 
-  DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_RENDERERS", [&](std::ostringstream& oss) { oss << "[" << mImpl->renderers.Count() << "]"; });
+  DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_RENDERERS", [&](std::ostringstream& oss)
+                                          { oss << "[" << mImpl->renderers.Count() << "]"; });
 
   for(const auto& rendererKey : mImpl->renderers)
   {
@@ -1178,8 +1182,7 @@ uint32_t UpdateManager::Update(float    elapsedSeconds,
                                uint32_t nextVSyncTimeMilliseconds,
                                bool     renderToFboEnabled,
                                bool     isRenderingToFbo,
-                               bool     uploadOnly,
-                               bool&    rendererAdded)
+                               bool     uploadOnly)
 {
   const BufferIndex bufferIndex = mSceneGraphBuffers.GetUpdateBufferIndex();
 
@@ -1227,7 +1230,8 @@ uint32_t UpdateManager::Update(float    elapsedSeconds,
   // We should not start skipping update steps or reusing lists until there has been two frames where nothing changes
   if(updateScene || mImpl->previousUpdateScene)
   {
-    DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_INTERNAL", [&](std::ostringstream& oss) {
+    DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_UPDATE_INTERNAL", [&](std::ostringstream& oss)
+                                            {
       oss << "[n:" << mImpl->nodes.Size() << ",";
       oss << "c:" << mImpl->customObjects.Size() << ",";
       oss << "a:" << mImpl->animations.Size() << ",";
@@ -1304,7 +1308,6 @@ uint32_t UpdateManager::Update(float    elapsedSeconds,
     // reset the update buffer index and make sure there is enough room in the instruction container
     if(mImpl->renderersAdded)
     {
-      rendererAdded = true;
       // Calculate how many render tasks we have in total
       std::size_t numberOfRenderTasks        = 0;
       std::size_t numberOfRenderInstructions = 0;
@@ -1584,7 +1587,8 @@ void UpdateManager::SetDepthIndices(OwnerPointer<NodeDepths>& nodeDepths)
     {
       // Reorder children container only if sibiling order changed.
       NodeContainer& container = node->GetChildren();
-      std::sort(container.Begin(), container.End(), [](Node* a, Node* b) { return a->GetDepthIndex() < b->GetDepthIndex(); });
+      std::sort(container.Begin(), container.End(), [](Node* a, Node* b)
+                { return a->GetDepthIndex() < b->GetDepthIndex(); });
     }
   }
 }
index c977e00619c71dde2d3278a7ac9e0273c9e40b73..60207915efce9ac6f125a8dc05f61423e7e1d741 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_UPDATE_MANAGER_H
 
 /*
- * Copyright (c) 2025 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -673,7 +673,6 @@ public:
    * @param[in] renderToFboEnabled Whether rendering into the Frame Buffer Object is enabled.
    * @param[in] isRenderingToFbo   Whether this frame is being rendered into the Frame Buffer Object.
    * @param[in] uploadOnly uploadOnly Upload the resource only without rendering.
-   * @param[out] rendererAdded Whether at least one of renderer added to update manager, or not.
    * @return True if further updates are required e.g. during animations.
    */
   uint32_t Update(float    elapsedSeconds,
@@ -681,8 +680,7 @@ public:
                   uint32_t nextVSyncTimeMilliseconds,
                   bool     renderToFboEnabled,
                   bool     isRenderingToFbo,
-                  bool     uploadOnly,
-                  bool&    rendererAdded);
+                  bool     uploadOnly);
 
   /**
    * This is called after rendering all the scenes in the next frame.