From ffcd08b5c778f6e540fc88c0a7b9d52cbe37e7b8 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 18 Sep 2024 16:05:15 +0200 Subject: [PATCH] backdrop,pdf_view: remove sync handling The sync handling makes the code more complicated without a benefit. Issue #5347 --- repos/gems/src/app/backdrop/main.cc | 15 --------------- repos/libports/src/app/pdf_view/main.cc | 14 +------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/repos/gems/src/app/backdrop/main.cc b/repos/gems/src/app/backdrop/main.cc index a78883ae4c..74af42cf0a 100644 --- a/repos/gems/src/app/backdrop/main.cc +++ b/repos/gems/src/app/backdrop/main.cc @@ -135,11 +135,6 @@ struct Backdrop::Main Signal_handler
_config_handler = { _env.ep(), *this, &Main::_handle_config_signal }; - void _handle_sync(); - - Signal_handler
_sync_handler = { - _env.ep(), *this, &Main::_handle_sync}; - template void _paint_texture(Surface &, Texture const &, Surface_base::Point, bool); @@ -345,20 +340,10 @@ void Backdrop::Main::_handle_config() } }); - /* schedule buffer refresh */ - _gui.framebuffer.sync_sigh(_sync_handler); -} - - -void Backdrop::Main::_handle_sync() -{ Libc::with_libc([&] () { _buffer->flush_surface(); _update_view(); }); - - /* disable sync signal until the next call of 'handle_config' */ - _gui.framebuffer.sync_sigh(Signal_context_capability()); } diff --git a/repos/libports/src/app/pdf_view/main.cc b/repos/libports/src/app/pdf_view/main.cc index 904a47183d..7931ee9b42 100644 --- a/repos/libports/src/app/pdf_view/main.cc +++ b/repos/libports/src/app/pdf_view/main.cc @@ -101,9 +101,6 @@ class Pdf_view Genode::Signal_handler _nit_mode_handler { _env.ep(), *this, &Pdf_view::_handle_nit_mode }; - Genode::Signal_handler _sync_handler { - _env.ep(), *this, &Pdf_view::_refresh }; - Genode::Signal_handler _input_handler { _env.ep(), *this, &Pdf_view::_handle_input_events }; @@ -213,14 +210,6 @@ class Pdf_view _handle_input_event(ev); }); }); } - void _refresh() - { - _gui.framebuffer.refresh(0, 0, _nit_mode.area.w, _nit_mode.area.h); - - /* handle one sync signal only */ - _gui.framebuffer.sync_sigh(Genode::Signal_context_capability()); - } - public: /** @@ -317,8 +306,7 @@ void Pdf_view::show() dst_line += dst_line_width; } - /* refresh after the next sync signal */ - _gui.framebuffer.sync_sigh(_sync_handler); + _gui.framebuffer.refresh(0, 0, _nit_mode.area.w, _nit_mode.area.h); }