framebuffer_session: use Rect as refresh argument

This patch replaces basic-type arguments x, y, w, h by the 'Rect' type,
and imports the Genode namespace into the Framebuffer namespace.

Issue #5350
This commit is contained in:
Norman Feske
2024-09-23 15:05:51 +02:00
committed by Christian Helmuth
parent e1b24d1ebd
commit 0e33830d1f
28 changed files with 70 additions and 63 deletions

View File

@ -262,9 +262,9 @@ class Framebuffer::Session_component : public Genode::Rpc_object<Session>
_timer.trigger_periodic(10*1000);
}
void refresh(int x, int y, int w, int h) override
void refresh(Rect rect) override
{
_window_content.redraw_area(x, y, w, h);
_window_content.redraw_area(rect.x1(), rect.y1(), rect.w(), rect.h());
}
};

View File

@ -444,7 +444,7 @@ struct Nitlog::Main
void _handle_timer()
{
if (_log_window.draw())
_gui.framebuffer.refresh(0, 0, _win_w, _win_h);
_gui.framebuffer.refresh({ { 0, 0 }, { _win_w, _win_h } });
}
Main(Env &env) : _env(env)