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
Recalculated layer's reusability flags after transform update
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
update
/
nodes
/
node.h
diff --git
a/dali/internal/update/nodes/node.h
b/dali/internal/update/nodes/node.h
index
b0a5818
..
a886a9b
100644
(file)
--- a/
dali/internal/update/nodes/node.h
+++ b/
dali/internal/update/nodes/node.h
@@
-122,13
+122,13
@@
public:
* @param[in] updated The updated flag
* (used for partial rendering to mark an animating sub tree for example).
*/
* @param[in] updated The updated flag
* (used for partial rendering to mark an animating sub tree for example).
*/
- void SetUpdated
(bool updated) override
+ void SetUpdated
Tree(bool updated)
{
mUpdated = updated;
for(Node* child : mChildren)
{
{
mUpdated = updated;
for(Node* child : mChildren)
{
- child->SetUpdated(updated);
+ child->SetUpdated
Tree
(updated);
}
}
}
}
@@
-360,7
+360,12
@@
public:
*/
const Vector3& GetParentOrigin() const
{
*/
const Vector3& GetParentOrigin() const
{
- return mParentOrigin.Get(0);
+ if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID)
+ {
+ return mParentOrigin.Get(0);
+ }
+
+ return Vector3::ZERO;
}
/**
}
/**
@@
-378,7
+383,12
@@
public:
*/
const Vector3& GetAnchorPoint() const
{
*/
const Vector3& GetAnchorPoint() const
{
- return mAnchorPoint.Get(0);
+ if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID)
+ {
+ return mAnchorPoint.Get(0);
+ }
+
+ return Vector3::ZERO;
}
/**
}
/**
@@
-411,7
+421,11
@@
public:
*/
const Vector3& GetWorldPosition(BufferIndex bufferIndex) const
{
*/
const Vector3& GetWorldPosition(BufferIndex bufferIndex) const
{
- return mWorldPosition.Get(bufferIndex);
+ if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID)
+ {
+ return mWorldPosition.Get(bufferIndex);
+ }
+ return Vector3::ZERO;
}
/**
}
/**
@@
-448,7
+462,11
@@
public:
*/
const Quaternion& GetWorldOrientation(BufferIndex bufferIndex) const
{
*/
const Quaternion& GetWorldOrientation(BufferIndex bufferIndex) const
{
- return mWorldOrientation.Get(0);
+ if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID)
+ {
+ return mWorldOrientation.Get(0);
+ }
+ return Quaternion::IDENTITY;
}
/**
}
/**
@@
-485,7
+503,11
@@
public:
*/
const Vector3& GetWorldScale(BufferIndex bufferIndex) const
{
*/
const Vector3& GetWorldScale(BufferIndex bufferIndex) const
{
- return mWorldScale.Get(0);
+ if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID)
+ {
+ return mWorldScale.Get(0);
+ }
+ return Vector3::ONE;
}
/**
}
/**
@@
-686,7
+708,12
@@
public:
*/
const Matrix& GetWorldMatrix(BufferIndex bufferIndex) const
{
*/
const Matrix& GetWorldMatrix(BufferIndex bufferIndex) const
{
- return mWorldMatrix.Get(bufferIndex);
+ if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID)
+ {
+ return mWorldMatrix.Get(bufferIndex);
+ }
+
+ return Matrix::IDENTITY;
}
/**
}
/**
@@
-759,7
+786,11
@@
public:
*/
void SetDepthIndex(uint32_t depthIndex)
{
*/
void SetDepthIndex(uint32_t depthIndex)
{
- mDepthIndex = depthIndex;
+ if(depthIndex != mDepthIndex)
+ {
+ SetDirtyFlag(NodePropertyFlags::DEPTH_INDEX);
+ mDepthIndex = depthIndex;
+ }
}
/**
}
/**