projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get world scale more faster
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
update
/
manager
/
render-instruction-processor.cpp
diff --git
a/dali/internal/update/manager/render-instruction-processor.cpp
b/dali/internal/update/manager/render-instruction-processor.cpp
index
e15862a
..
87c3c98
100644
(file)
--- a/
dali/internal/update/manager/render-instruction-processor.cpp
+++ b/
dali/internal/update/manager/render-instruction-processor.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 202
2
Samsung Electronics Co., Ltd.
+ * Copyright (c) 202
3
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-216,12
+216,12
@@
inline void AddRendererToRenderList(BufferIndex updateBufferIndex,
SetNodeUpdateArea(node, isLayer3d, nodeWorldMatrix, nodeSize, nodeUpdateArea);
nodeUpdateAreaSet = true;
SetNodeUpdateArea(node, isLayer3d, nodeWorldMatrix, nodeSize, nodeUpdateArea);
nodeUpdateAreaSet = true;
- const Vector3& scale = node
->GetWorldScale(updateBufferIndex
);
+ const Vector3& scale = node
WorldMatrix.GetScale(
);
const Vector3& size = Vector3(nodeUpdateArea.z, nodeUpdateArea.w, 1.0f) * scale;
if(size.LengthSquared() > Math::MACHINE_EPSILON_1000)
{
const Vector3& size = Vector3(nodeUpdateArea.z, nodeUpdateArea.w, 1.0f) * scale;
if(size.LengthSquared() > Math::MACHINE_EPSILON_1000)
{
- MatrixUtils::Multiply(nodeModelViewMatrix, nodeWorldMatrix, viewMatrix);
+ MatrixUtils::Multiply
TransformMatrix
(nodeModelViewMatrix, nodeWorldMatrix, viewMatrix);
nodeModelViewMatrixSet = true;
// Assume actors are at z=0, compute AABB in view space & test rect intersection
nodeModelViewMatrixSet = true;
// Assume actors are at z=0, compute AABB in view space & test rect intersection
@@
-266,13
+266,13
@@
inline void AddRendererToRenderList(BufferIndex updateBufferIndex,
if(DALI_LIKELY(renderable.mRenderer))
{
if(DALI_LIKELY(renderable.mRenderer))
{
- item.mRenderer =
&
renderable.mRenderer->GetRenderer();
+ item.mRenderer = renderable.mRenderer->GetRenderer();
item.mTextureSet = renderable.mRenderer->GetTextureSet();
item.mDepthIndex += renderable.mRenderer->GetDepthIndex();
}
else
{
item.mTextureSet = renderable.mRenderer->GetTextureSet();
item.mDepthIndex += renderable.mRenderer->GetDepthIndex();
}
else
{
- item.mRenderer =
nullptr
;
+ item.mRenderer =
Render::RendererKey{}
;
}
item.mIsUpdated |= isLayer3d;
}
item.mIsUpdated |= isLayer3d;
@@
-288,7
+288,7
@@
inline void AddRendererToRenderList(BufferIndex updateBufferIndex,
if(!nodeModelViewMatrixSet)
{
if(!nodeModelViewMatrixSet)
{
- MatrixUtils::Multiply(nodeModelViewMatrix, nodeWorldMatrix, viewMatrix);
+ MatrixUtils::Multiply
TransformMatrix
(nodeModelViewMatrix, nodeWorldMatrix, viewMatrix);
}
item.mModelViewMatrix = nodeModelViewMatrix;
}
item.mModelViewMatrix = nodeModelViewMatrix;
@@
-382,16
+382,17
@@
inline bool TryReuseCachedRenderers(Layer& layer,
// Therefore we check a combined sum of all renderer addresses.
size_t checkSumNew = 0;
size_t checkSumOld = 0;
// Therefore we check a combined sum of all renderer addresses.
size_t checkSumNew = 0;
size_t checkSumOld = 0;
+ //@todo just use keys, don't deref.
for(uint32_t index = 0; index < renderableCount; ++index)
{
if(DALI_LIKELY(renderables[index].mRenderer))
{
for(uint32_t index = 0; index < renderableCount; ++index)
{
if(DALI_LIKELY(renderables[index].mRenderer))
{
-
const Render::Renderer&
renderer = renderables[index].mRenderer->GetRenderer();
- checkSumNew += re
interpret_cast<std::size_t>(&renderer
);
+
Render::RendererKey
renderer = renderables[index].mRenderer->GetRenderer();
+ checkSumNew += re
nderer.Value(
);
}
if(DALI_LIKELY(renderList.GetItem(index).mRenderer))
{
}
if(DALI_LIKELY(renderList.GetItem(index).mRenderer))
{
- checkSumOld += re
interpret_cast<std::size_t>(&renderList.GetRenderer(index)
);
+ checkSumOld += re
nderList.GetItem(index).mRenderer.Value(
);
}
}
if(checkSumNew == checkSumOld)
}
}
if(checkSumNew == checkSumOld)
@@
-475,8
+476,8
@@
inline void RenderInstructionProcessor::SortRenderItems(BufferIndex bufferIndex,
for(uint32_t index = 0; index < renderableCount; ++index)
{
for(uint32_t index = 0; index < renderableCount; ++index)
{
- RenderItem
& item = renderList.GetItem
(index);
-
+ RenderItem
Key itemKey = renderList.GetItemKey
(index);
+ RenderItem& item = *itemKey.Get();
if(DALI_LIKELY(item.mRenderer))
{
item.mRenderer->SetSortAttributes(mSortingHelper[index]);
if(DALI_LIKELY(item.mRenderer))
{
item.mRenderer->SetSortAttributes(mSortingHelper[index]);
@@
-488,7
+489,7
@@
inline void RenderInstructionProcessor::SortRenderItems(BufferIndex bufferIndex,
mSortingHelper[index].zValue = zValueFunctionFromVector3[zValueFunctionIndex](item.mModelViewMatrix.GetTranslation3()) - static_cast<float>(item.mDepthIndex);
// Keep the renderitem pointer in the helper so we can quickly reorder items after sort.
mSortingHelper[index].zValue = zValueFunctionFromVector3[zValueFunctionIndex](item.mModelViewMatrix.GetTranslation3()) - static_cast<float>(item.mDepthIndex);
// Keep the renderitem pointer in the helper so we can quickly reorder items after sort.
- mSortingHelper[index].renderItem =
&item
;
+ mSortingHelper[index].renderItem =
itemKey
;
}
// Here we determine which comparitor (of the 3) to use.
}
// Here we determine which comparitor (of the 3) to use.
@@
-505,7
+506,7
@@
inline void RenderInstructionProcessor::SortRenderItems(BufferIndex bufferIndex,
for(uint32_t index = 0; index < renderableCount; ++index, ++renderListIter)
{
*renderListIter = mSortingHelper[index].renderItem;
for(uint32_t index = 0; index < renderableCount; ++index, ++renderListIter)
{
*renderListIter = mSortingHelper[index].renderItem;
- DALI_LOG_INFO(gRenderListLogFilter, Debug::Verbose, " sortedList[%d] = %
p
\n", index, mSortingHelper[index].renderItem->mRenderer);
+ DALI_LOG_INFO(gRenderListLogFilter, Debug::Verbose, " sortedList[%d] = %
x
\n", index, mSortingHelper[index].renderItem->mRenderer);
}
}
}
}