summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-06-01 17:09:16 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-06-01 17:09:16 +0200
commit06fc052e5c942a20cbf1c748b0f4d485202260bd (patch)
treea5f0fdc3f3004d4067d7a4db849a2528d09149b4 /src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H
parentc3217094db326dc20fe752cd33db8a5b9b01fa5d (diff)
Fix "Huge memory leak under Wayland" (#730)
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H
index b9dbb78be..b6697df40 100644
--- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H
+++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H
@@ -72,6 +72,12 @@ class Fl_Wayland_Graphics_Driver : public Fl_Cairo_Graphics_Driver {
private:
struct fl_wld_buffer *buffer_;
public:
+ struct wld_shm_pool_data { // attached to wl_shm_pool objects
+ char *pool_memory; // start of mmap'ed memory encapsulated by the wl_shm_pool
+ int pool_size; // size of encapsulated memory
+ int use_count; // nber of active wl_buffer objects in this wl_shm_pool
+ bool destroyed; // true after the wl_shm_pool was destroyed
+ };
Fl_Wayland_Graphics_Driver();
static const uint32_t wld_format;
void set_buffer(struct fl_wld_buffer *buffer, float scale = 0);