mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 07:46:42 +00:00
nitpicker: make redraw debug feature configurable
This commit is contained in:
parent
d7256c60a0
commit
0cc314399c
@ -1195,8 +1195,6 @@ struct Nitpicker::Main
|
||||
|
||||
Main(Server::Entrypoint &ep) : ep(ep)
|
||||
{
|
||||
// tmp_fb = &framebuffer;
|
||||
|
||||
user_state.default_background(background);
|
||||
user_state.stack(pointer_origin);
|
||||
user_state.stack(background);
|
||||
@ -1345,6 +1343,13 @@ void Nitpicker::Main::handle_config(unsigned)
|
||||
.attribute("color").value(&background.color);
|
||||
} catch (...) { }
|
||||
|
||||
/* enable or disable redraw debug mode */
|
||||
try {
|
||||
tmp_fb = nullptr;
|
||||
if (config()->xml_node().attribute("flash").has_value("yes"))
|
||||
tmp_fb = &framebuffer;
|
||||
} catch (...) { }
|
||||
|
||||
configure_reporter(pointer_reporter);
|
||||
configure_reporter(hover_reporter);
|
||||
configure_reporter(focus_reporter);
|
||||
|
@ -129,8 +129,8 @@ void View::draw(Canvas_base &canvas, Mode const &mode) const
|
||||
if (!canvas.clip().valid() || !&_session) return;
|
||||
|
||||
if (tmp_fb) {
|
||||
for (unsigned i = 0; i < 7; i++) {
|
||||
canvas.draw_box(view_rect, Color(i*2,i*6,i*16*2));
|
||||
for (unsigned i = 0; i < 2; i++) {
|
||||
canvas.draw_box(view_rect, Color(i*8,i*24,i*16*8));
|
||||
tmp_fb->refresh(0,0,1024,768);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user