mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-03 09:12:57 +00:00
backdrop,pdf_view: remove sync handling
The sync handling makes the code more complicated without a benefit. Issue #5347
This commit is contained in:
parent
0e55119b36
commit
ffcd08b5c7
@ -135,11 +135,6 @@ struct Backdrop::Main
|
|||||||
Signal_handler<Main> _config_handler = {
|
Signal_handler<Main> _config_handler = {
|
||||||
_env.ep(), *this, &Main::_handle_config_signal };
|
_env.ep(), *this, &Main::_handle_config_signal };
|
||||||
|
|
||||||
void _handle_sync();
|
|
||||||
|
|
||||||
Signal_handler<Main> _sync_handler = {
|
|
||||||
_env.ep(), *this, &Main::_handle_sync};
|
|
||||||
|
|
||||||
template <typename PT>
|
template <typename PT>
|
||||||
void _paint_texture(Surface<PT> &, Texture<PT> const &, Surface_base::Point, bool);
|
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([&] () {
|
Libc::with_libc([&] () {
|
||||||
_buffer->flush_surface();
|
_buffer->flush_surface();
|
||||||
_update_view();
|
_update_view();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* disable sync signal until the next call of 'handle_config' */
|
|
||||||
_gui.framebuffer.sync_sigh(Signal_context_capability());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,9 +101,6 @@ class Pdf_view
|
|||||||
Genode::Signal_handler<Pdf_view> _nit_mode_handler {
|
Genode::Signal_handler<Pdf_view> _nit_mode_handler {
|
||||||
_env.ep(), *this, &Pdf_view::_handle_nit_mode };
|
_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 {
|
Genode::Signal_handler<Pdf_view> _input_handler {
|
||||||
_env.ep(), *this, &Pdf_view::_handle_input_events };
|
_env.ep(), *this, &Pdf_view::_handle_input_events };
|
||||||
|
|
||||||
@ -213,14 +210,6 @@ class Pdf_view
|
|||||||
_handle_input_event(ev); }); });
|
_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:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -317,8 +306,7 @@ void Pdf_view::show()
|
|||||||
dst_line += dst_line_width;
|
dst_line += dst_line_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* refresh after the next sync signal */
|
_gui.framebuffer.refresh(0, 0, _nit_mode.area.w, _nit_mode.area.h);
|
||||||
_gui.framebuffer.sync_sigh(_sync_handler);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user