From b8fa522ca42407515f28dcdba4caddefe211ca27 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 25 Sep 2023 16:40:01 +0200 Subject: New member function Fl_Wayland_Graphics_Driver::create_wld_buffer() The previous member Fl_Wayland_Graphics_Driver::create_shm_buffer() is now renamed to create_wld_buffer() and divided in 2 parts: - one is related to the draw buffer; - the other is related to the wl_buffer and is what is now called create_shm_buffer(). This allows to delay creation of the wl_buffer until absolutely necessary, done inside Fl_Wayland_Graphics_Driver::buffer_commit(). --- src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H') diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H index 8dfef0a97..00bc6af4d 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H @@ -54,7 +54,8 @@ public: }; static const uint32_t wld_format; void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen osrc, int srcx, int srcy) FL_OVERRIDE; - static struct wld_buffer *create_shm_buffer(int width, int height); + static struct wld_buffer *create_wld_buffer(int width, int height, bool with_shm = true); + static void create_shm_buffer(wld_buffer *buffer); static void buffer_release(struct wld_window *window); static void buffer_commit(struct wld_window *window, struct flCairoRegion *r = NULL); static void cairo_init(struct draw_buffer *buffer, int width, int height, int stride, cairo_format_t format); -- cgit v1.2.3