/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
UpdateNodeOpacity(node, nodeDirtyFlags, updateBufferIndex);
- // Collect uniform maps
- node.PrepareRender(updateBufferIndex);
+ node.UpdateUniformHash(updateBufferIndex);
// For partial update, mark all children of an animating node as updated.
if(updated) // Only set to updated if parent was updated.
{
layer->SetReuseRenderers(updateBufferIndex, false);
}
+ else
+ {
+ // If the node is not dirty, then check renderers
+ const uint32_t count = node.GetRendererCount();
+ for(uint32_t i = 0; i < count; ++i)
+ {
+ SceneGraph::Renderer* renderer = node.GetRendererAt(i);
+ if(renderer->IsDirty())
+ {
+ layer->SetReuseRenderers(updateBufferIndex, false);
+ break;
+ }
+ }
+ }
// recurse children
NodeContainer& children = node.GetChildren();
NodePropertyFlags nodeDirtyFlags = layer.GetDirtyFlags();
nodeDirtyFlags |= (layer.IsLocalMatrixDirty() ? NodePropertyFlags::TRANSFORM : NodePropertyFlags::NOTHING);
+ layer.SetReuseRenderers(updateBufferIndex, nodeDirtyFlags == NodePropertyFlags::NOTHING);
+
// recurse children
NodeContainer& children = layer.GetChildren();
const NodeIter endIter = children.End();