(Partial Update) Remove unnecessary data 07/285607/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 15 Dec 2022 08:15:21 +0000 (17:15 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 15 Dec 2022 08:15:21 +0000 (17:15 +0900)
Change-Id: I2132b9cff9e04a377784e81e5482e49d2f16fe15

dali/internal/render/common/render-item.cpp
dali/internal/render/common/render-item.h
dali/internal/update/common/property-owner.h
dali/internal/update/manager/render-instruction-processor.cpp
dali/internal/update/nodes/node.h
dali/internal/update/nodes/partial-rendering-data.h

index 9b3ba8c..fabaccc 100644 (file)
@@ -42,7 +42,6 @@ RenderItem* RenderItem::New()
 RenderItem::RenderItem()
 : mModelMatrix(false),
   mModelViewMatrix(false),
-  mColor(Vector4::ZERO),
   mSize(),
   mRenderer(nullptr),
   mNode(nullptr),
index d1ca0f4..2fe74bd 100644 (file)
@@ -90,7 +90,6 @@ struct RenderItem
 
   Matrix            mModelMatrix;
   Matrix            mModelViewMatrix;
-  Vector4           mColor;
   Vector3           mSize;
   Vector4           mUpdateArea; ///< Update area hint is provided for damaged area calculation. (x, y, width, height)
   Render::Renderer* mRenderer;
index 1d3fee7..f4329fa 100644 (file)
@@ -162,7 +162,7 @@ public:
    * Mark an property owner with the updated flag.
    * @param[in] updated The updated flag
    */
-  virtual void SetUpdated(bool updated)
+  void SetUpdated(bool updated)
   {
     mUpdated = updated;
   }
index 50bdc0e..e15862a 100644 (file)
@@ -260,15 +260,9 @@ inline void AddRendererToRenderList(BufferIndex               updateBufferIndex,
       // Get the next free RenderItem.
       RenderItem& item = renderList.GetNextFreeItem();
 
-      item.mNode     = node;
-      item.mIsOpaque = isOpaque;
-      item.mColor    = node->GetColor(updateBufferIndex);
-
-      item.mDepthIndex = 0;
-      if(!isLayer3d)
-      {
-        item.mDepthIndex = node->GetDepthIndex();
-      }
+      item.mNode       = node;
+      item.mIsOpaque   = isOpaque;
+      item.mDepthIndex = isLayer3d ? 0 : node->GetDepthIndex();
 
       if(DALI_LIKELY(renderable.mRenderer))
       {
@@ -300,7 +294,6 @@ inline void AddRendererToRenderList(BufferIndex               updateBufferIndex,
 
       PartialRenderingData partialRenderingData;
       partialRenderingData.color               = node->GetWorldColor(updateBufferIndex);
-      partialRenderingData.depthIndex          = node->GetDepthIndex();
       partialRenderingData.matrix              = item.mModelViewMatrix;
       partialRenderingData.updatedPositionSize = item.mUpdateArea;
       partialRenderingData.size                = item.mSize;
index 3e28d7b..a244edf 100644 (file)
@@ -803,6 +803,7 @@ public:
     if(depthIndex != mDepthIndex)
     {
       SetDirtyFlag(NodePropertyFlags::DEPTH_INDEX);
+      SetUpdated(true);
       mDepthIndex = depthIndex;
     }
   }
index cd52c50..5d7f943 100644 (file)
@@ -37,8 +37,7 @@ struct PartialRenderingData
   Vector4  color{};               /// Color
   Vector4  updatedPositionSize{}; /// Updated position/size (x, y, width, height)
   Vector3  size{};                /// Size
-  uint32_t depthIndex{0u};        /// Depth index
-  uint32_t hash;                  /// Last frame's hash
+  uint32_t hash{0u};              /// Last frame's hash
 
   bool mVisible{true};   /// Visible state (Not hashed)
   bool mRendered{false}; /// Rendering state (Not hashed)
@@ -53,7 +52,6 @@ struct PartialRenderingData
     AddToHash(hash, &color, sizeof(decltype(color)));
     AddToHash(hash, &updatedPositionSize, sizeof(decltype(updatedPositionSize)));
     AddToHash(hash, &size, sizeof(decltype(size)));
-    AddToHash(hash, &depthIndex, sizeof(decltype(depthIndex)));
   }
 
   /**
@@ -69,7 +67,6 @@ struct PartialRenderingData
            color != frameCache.color ||
            updatedPositionSize != frameCache.updatedPositionSize ||
            size != frameCache.size ||
-           depthIndex != frameCache.depthIndex ||
            !mRendered; // If everything is the same, check if we didn't render last frame.
   }
 
@@ -79,7 +76,6 @@ struct PartialRenderingData
     color               = frameCache.color;
     updatedPositionSize = frameCache.updatedPositionSize;
     size                = frameCache.size;
-    depthIndex          = frameCache.depthIndex;
     hash                = frameCache.hash;
 
     mRendered = true;