backdrop,pdf_view: remove sync handling

The sync handling makes the code more complicated without a benefit.

Issue #5347
This commit is contained in:
Norman Feske 2024-09-18 16:05:15 +02:00 committed by Christian Helmuth
parent 0e55119b36
commit ffcd08b5c7
2 changed files with 1 additions and 28 deletions

View File

@ -135,11 +135,6 @@ struct Backdrop::Main
Signal_handler<Main> _config_handler = {
_env.ep(), *this, &Main::_handle_config_signal };
void _handle_sync();
Signal_handler<Main> _sync_handler = {
_env.ep(), *this, &Main::_handle_sync};
template <typename PT>
void _paint_texture(Surface<PT> &, Texture<PT> 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());
}

View File

@ -101,9 +101,6 @@ class Pdf_view
Genode::Signal_handler<Pdf_view> _nit_mode_handler {
_env.ep(), *this, &Pdf_view::_handle_nit_mode };
Genode::Signal_handler<Pdf_view> _sync_handler {
_env.ep(), *this, &Pdf_view::_refresh };
Genode::Signal_handler<Pdf_view> _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);
}