1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Renderer: Eliminates String allocations for all labels in the renderer

Uses `Span<char>` to avoid additional allocations in the graph.
This commit is contained in:
Stuart Carnie
2025-05-23 06:52:10 +10:00
parent 6c9765d87e
commit 7d93119353
10 changed files with 30 additions and 19 deletions

View File

@@ -816,7 +816,7 @@ public:
void add_texture_update(RDD::TextureID p_dst, ResourceTracker *p_dst_tracker, VectorView<RecordedBufferToTextureCopy> p_buffer_copies, VectorView<ResourceTracker *> p_buffer_trackers = VectorView<ResourceTracker *>());
void add_capture_timestamp(RDD::QueryPoolID p_query_pool, uint32_t p_index);
void add_synchronization();
void begin_label(const String &p_label_name, const Color &p_color);
void begin_label(const Span<char> &p_label_name, const Color &p_color);
void end_label();
void end(bool p_reorder_commands, bool p_full_barriers, RDD::CommandBufferID &r_command_buffer, CommandBufferPool &r_command_buffer_pool);
static ResourceTracker *resource_tracker_create();