FLTK logo

[master] cbd37a2 - Wayland: fix progressive drawing as in test/mandelbrot

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] cbd37a2 - Wayland: fix progressive drawing as in test/mandelbrot "ManoloFLTK" Dec 07, 2022  
 
commit cbd37a2870ebdb396033f30d901c0dd7c4097e8a
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Dec 7 08:46:50 2022 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Dec 7 08:46:50 2022 +0100

    Wayland: fix progressive drawing as in test/mandelbrot

 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index cc5bc13..7974700 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -322,7 +322,7 @@ void Fl_Wayland_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top,
   top->scale(pWindow->w(), htop);
 }
 
-// used only to support progressive drawing
+// used to support both normal and progressive drawing
 static void surface_frame_done(void *data, struct wl_callback *cb, uint32_t time);
 
 static const struct wl_callback_listener surface_frame_listener = {
@@ -387,18 +387,6 @@ void Fl_Wayland_Window_Driver::make_current() {
 }
 
 
-// used to support regular drawing
-static void surface_frame_one_shot(void *data, struct wl_callback *cb, uint32_t time) {
-  wl_callback_destroy(cb);
-  struct wld_window *window = (struct wld_window *)data;
-  window->buffer->cb = NULL;
-}
-
-static const struct wl_callback_listener surface_frame_listener_one_shot = {
-  .done = surface_frame_one_shot,
-};
-
-
 void Fl_Wayland_Window_Driver::flush() {
   if (!pWindow->damage()) return;
   if (pWindow->as_gl_window()) {
@@ -437,7 +425,7 @@ void Fl_Wayland_Window_Driver::flush() {
   Fl_Window_Driver::flush();
   Fl_Wayland_Window_Driver::in_flush = false;
   if (window->buffer->cb) wl_callback_destroy(window->buffer->cb);
-  Fl_Wayland_Graphics_Driver::buffer_commit(window, &surface_frame_listener_one_shot, false);
+  Fl_Wayland_Graphics_Driver::buffer_commit(window, &surface_frame_listener, false);
 }
 
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.