summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-09-25 16:40:01 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-09-25 16:40:01 +0200
commitb8fa522ca42407515f28dcdba4caddefe211ca27 (patch)
tree4a9093bd2312a769c287244d12bd566445932bb0 /src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
parent59b251cc39bc5735bbd33ab4fbf41dab03efef21 (diff)
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().
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index b149cbe0b..2af93b973 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -350,8 +350,8 @@ void Fl_Wayland_Window_Driver::make_current() {
float f = Fl::screen_scale(pWindow->screen_num());
int wld_s = wld_scale();
if (!window->buffer) {
- window->buffer = Fl_Wayland_Graphics_Driver::create_shm_buffer(
- int(pWindow->w() * f) * wld_s, int(pWindow->h() * f) * wld_s);
+ window->buffer = Fl_Wayland_Graphics_Driver::create_wld_buffer(
+ int(pWindow->w() * f) * wld_s, int(pWindow->h() * f) * wld_s, false);
((Fl_Cairo_Graphics_Driver*)fl_graphics_driver)->needs_commit_tag(
&window->buffer->draw_buffer_needs_commit);
}