mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-11 13:35:27 +00:00
menu_view: remove minor code redundancy
This is a follow-up commit for "menu_view: configurable alpha channel and bg color", which simplifies the code. The '_no_alpha' surface is not needed because the 'Gui_buffer' provides a 0x0 alpha surface when using the opaque mode.
This commit is contained in:
parent
8bccc6e68f
commit
0ff755b236
@ -41,11 +41,6 @@ struct Menu_view::Main
|
|||||||
|
|
||||||
Constructible<Gui_buffer> _buffer { };
|
Constructible<Gui_buffer> _buffer { };
|
||||||
|
|
||||||
/**
|
|
||||||
* Alpha surface used when operating in opaque mode
|
|
||||||
*/
|
|
||||||
Surface<Pixel_alpha8> _no_alpha { nullptr, Area(0,0) };
|
|
||||||
|
|
||||||
Gui::Session::View_handle _view_handle = _gui.create_view();
|
Gui::Session::View_handle _view_handle = _gui.create_view();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -422,7 +417,7 @@ void Menu_view::Main::_handle_frame_timer()
|
|||||||
// don't perform a full dialog update
|
// don't perform a full dialog update
|
||||||
_buffer->apply_to_surface([&] (Surface<Pixel_rgb888> &pixel,
|
_buffer->apply_to_surface([&] (Surface<Pixel_rgb888> &pixel,
|
||||||
Surface<Pixel_alpha8> &alpha) {
|
Surface<Pixel_alpha8> &alpha) {
|
||||||
_root_widget.draw(pixel, _opaque ? _no_alpha : alpha, Point(0, 0));
|
_root_widget.draw(pixel, alpha, Point(0, 0));
|
||||||
});
|
});
|
||||||
|
|
||||||
_buffer->flush_surface();
|
_buffer->flush_surface();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user