diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-09-22 11:51:24 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-09-22 11:51:24 +0200 |
| commit | 220dd47bea588e65416faa2a51663304f8d0a8bc (patch) | |
| tree | 01a63c78bfe184370ee0144f1086c62147ac634b /src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H | |
| parent | cee69943e5986f471d49b1378311cb06e1487733 (diff) | |
Increase reuse of mmap'ed data by FLTK Wayland buffer factory
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H index 9991bd99f..8dfef0a97 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H @@ -30,20 +30,22 @@ class Fl_Wayland_Graphics_Driver : public Fl_Cairo_Graphics_Driver { public: struct draw_buffer { + unsigned char *buffer; + cairo_t *cairo_; size_t data_size; // of wl_buffer and buffer int stride; int width; - unsigned char *buffer; - cairo_t *cairo_; }; struct wld_buffer { struct draw_buffer draw_buffer; + struct wl_list link; // links all buffers from the same wl_shm_pool struct wl_buffer *wl_buffer; void *data; struct wl_callback *cb; - bool draw_buffer_needs_commit; struct wl_shm_pool *shm_pool; - struct wl_list link; // links all buffers from the same wl_shm_pool + bool draw_buffer_needs_commit; + bool in_use; // true while being committed + bool released; // true after buffer_release() was called }; struct wld_shm_pool_data { // one record attached to each wl_shm_pool object char *pool_memory; // start of mmap'ed memory encapsulated by the wl_shm_pool |
