/*
- * Copyright (c) 2023 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.
*
* @param[in] updateBufferIndex The current update buffer index.
* @param[in] node The current node of the scene-graph.
+ * @param[in] parentVisibilityChanged The parent node's visibility was changed at current frame.
* @param[in] currentLayer The current layer containing lists of opaque/transparent renderables.
* @param[in] renderTask The current render-task.
* @param[in] inheritedDrawMode The draw mode of the parent
*/
void AddRenderablesForTask(BufferIndex updateBufferIndex,
Node& node,
+ bool parentVisibilityChanged,
Layer& currentLayer,
RenderTask& renderTask,
int inheritedDrawMode,
if(!node.GetPartialRenderingData().mVisible)
{
node.GetPartialRenderingData().mVisible = true;
- node.SetUpdatedTree(true);
+ parentVisibilityChanged = true;
+ }
+
+ if(parentVisibilityChanged)
+ {
+ node.SetUpdated(true);
}
// Check whether node is exclusive to a different render-task
for(NodeIter iter = children.Begin(); iter != endIter; ++iter)
{
Node& child = **iter;
- AddRenderablesForTask(updateBufferIndex, child, *layer, renderTask, inheritedDrawMode, currentClippingId, clippingDepth, scissorDepth, clippingUsed, keepRendering);
+ AddRenderablesForTask(updateBufferIndex, child, parentVisibilityChanged, *layer, renderTask, inheritedDrawMode, currentClippingId, clippingDepth, scissorDepth, clippingUsed, keepRendering);
}
}
AddRenderablesForTask(updateBufferIndex,
*sourceNode,
+ false,
*layer,
renderTask,
sourceNode->GetDrawMode(),