Only run update and check_timer functions on components that need it

This commit is contained in:
Yousef Khadadeh 2025-07-21 13:57:48 +03:00
parent f82e626686
commit 1c1f23d68d
2 changed files with 27 additions and 4 deletions

View file

@ -55,9 +55,15 @@ class DrawingProgram {
CollabListType components;
std::unordered_set<std::shared_ptr<DrawComponent>> updateableComponents;
std::unordered_set<std::shared_ptr<DrawComponent>> delayedUpdateTransformComponents;
Vector4f* get_foreground_color_ptr();
private:
void check_delayed_update_transform_timers();
void check_updateable_components();
std::atomic<bool> addFileInNextFrame = false;
std::pair<std::string, Vector2f> addFileInfo;