From: Heeyong Song Date: Thu, 15 Dec 2022 08:15:21 +0000 (+0900) Subject: (Partial Update) Remove unnecessary data X-Git-Tag: dali_2.2.7~13 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=refs%2Fchanges%2F07%2F285607%2F1 (Partial Update) Remove unnecessary data Change-Id: I2132b9cff9e04a377784e81e5482e49d2f16fe15 --- diff --git a/dali/internal/render/common/render-item.cpp b/dali/internal/render/common/render-item.cpp index 9b3ba8c..fabaccc 100644 --- a/dali/internal/render/common/render-item.cpp +++ b/dali/internal/render/common/render-item.cpp @@ -42,7 +42,6 @@ RenderItem* RenderItem::New() RenderItem::RenderItem() : mModelMatrix(false), mModelViewMatrix(false), - mColor(Vector4::ZERO), mSize(), mRenderer(nullptr), mNode(nullptr), diff --git a/dali/internal/render/common/render-item.h b/dali/internal/render/common/render-item.h index d1ca0f4..2fe74bd 100644 --- a/dali/internal/render/common/render-item.h +++ b/dali/internal/render/common/render-item.h @@ -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; diff --git a/dali/internal/update/common/property-owner.h b/dali/internal/update/common/property-owner.h index 1d3fee7..f4329fa 100644 --- a/dali/internal/update/common/property-owner.h +++ b/dali/internal/update/common/property-owner.h @@ -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; } diff --git a/dali/internal/update/manager/render-instruction-processor.cpp b/dali/internal/update/manager/render-instruction-processor.cpp index 50bdc0e..e15862a 100644 --- a/dali/internal/update/manager/render-instruction-processor.cpp +++ b/dali/internal/update/manager/render-instruction-processor.cpp @@ -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; diff --git a/dali/internal/update/nodes/node.h b/dali/internal/update/nodes/node.h index 3e28d7b..a244edf 100644 --- a/dali/internal/update/nodes/node.h +++ b/dali/internal/update/nodes/node.h @@ -803,6 +803,7 @@ public: if(depthIndex != mDepthIndex) { SetDirtyFlag(NodePropertyFlags::DEPTH_INDEX); + SetUpdated(true); mDepthIndex = depthIndex; } } diff --git a/dali/internal/update/nodes/partial-rendering-data.h b/dali/internal/update/nodes/partial-rendering-data.h index cd52c50..5d7f943 100644 --- a/dali/internal/update/nodes/partial-rendering-data.h +++ b/dali/internal/update/nodes/partial-rendering-data.h @@ -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;