draw rect optimization

This commit is contained in:
Jorijn van der Graaf 2025-11-26 23:36:08 +01:00
commit 615d90c36f
3 changed files with 113 additions and 30 deletions

View file

@ -56,9 +56,7 @@ export namespace Crafter {
Event<FrameTime> onUpdate;
bool open = true;
bool updating = false;
std::vector<ClipRect> dirtyRects;
void AddDirtyRect(ScaleData rect);
Window() = default;
Window(std::int_fast32_t width, std::int_fast32_t height);
@ -66,6 +64,7 @@ export namespace Crafter {
Window(Window&&) = delete;
virtual ~Window() = default;
Window& operator=(const Window&) = delete;
void AddDirtyRect(ScaleData rect);
virtual void StartSync() = 0;
virtual void StartUpdate() = 0;
virtual void StopUpdate() = 0;