LibGUI: Window now uses double buffering

This allows data in shared memory object be always up to date. With this
change window server can update lazily, and not necessarily on all
invalidate calls
This commit is contained in:
2024-06-27 00:39:59 +03:00
parent f538dd5276
commit 0c645ba867
2 changed files with 21 additions and 18 deletions

View File

@@ -136,9 +136,10 @@ namespace LibGUI
int server_fd() const { return m_server_fd; }
private:
Window(int server_fd, uint32_t* framebuffer, uint32_t width, uint32_t height)
Window(int server_fd, uint32_t* framebuffer_smo, BAN::Vector<uint32_t>&& framebuffer, uint32_t width, uint32_t height)
: m_server_fd(server_fd)
, m_framebuffer(framebuffer)
, m_framebuffer_smo(framebuffer_smo)
, m_width(width)
, m_height(height)
{ }
@@ -147,7 +148,9 @@ namespace LibGUI
private:
int m_server_fd;
uint32_t* m_framebuffer;
BAN::Vector<uint32_t> m_framebuffer;
uint32_t* m_framebuffer_smo;
uint32_t m_width;
uint32_t m_height;