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

Optimize shared texture creation

Texture::slice_trackers is now a pointer and is allocated on demand only when a shared texture is created.
This makes copying Texture significantly faster.
This commit is contained in:
ze2j
2024-12-20 16:45:15 +01:00
parent 30bb49ec1f
commit 6413a8a94b
2 changed files with 16 additions and 9 deletions

View File

@@ -319,7 +319,7 @@ public:
RID owner;
RDG::ResourceTracker *draw_tracker = nullptr;
HashMap<Rect2i, RDG::ResourceTracker *> slice_trackers;
HashMap<Rect2i, RDG::ResourceTracker *> *slice_trackers = nullptr;
SharedFallback *shared_fallback = nullptr;
int32_t transfer_worker_index = -1;
uint64_t transfer_worker_operation = 0;