Renderer/RenderFrame: Use FunctionRef instead of std::function to avoid allocations

This commit is contained in:
SirLynix
2023-01-01 19:48:51 +01:00
parent 8555b3d6ef
commit a8b6d9cb42
7 changed files with 9 additions and 7 deletions

View File

@@ -9,7 +9,7 @@
namespace Nz
{
void RenderFrame::Execute(const std::function<void(CommandBufferBuilder& builder)>& callback, QueueTypeFlags queueTypeFlags)
void RenderFrame::Execute(const FunctionRef<void(CommandBufferBuilder& builder)>& callback, QueueTypeFlags queueTypeFlags)
{
if (!m_image)
throw std::runtime_error("frame is either invalid or has already been presented");