mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
Kernel/Graphics: Simplify the feature level of the Graphics subsystem
Instead of letting the user to determine whether framebuffer devices will be created (which is useless because they are gone by now), let's simplify the flow by allowing the user to choose between full, limited or disabled functionality. The determination happens only once, so, if the user decided to disable graphics support, the initialize method exits immediately. If limited functionality is chosen, then a generic DisplayConnector is initialized with the preset framebuffer resolution, if present, and then the initialize method exits. As a default, the code proceeds to initialize all drivers as usual.
This commit is contained in:
parent
e301af8352
commit
d49a35df31
5 changed files with 35 additions and 50 deletions
|
@ -33,10 +33,6 @@ public:
|
|||
void attach_new_display_connector(Badge<DisplayConnector>, DisplayConnector&);
|
||||
void detach_display_connector(Badge<DisplayConnector>, DisplayConnector&);
|
||||
|
||||
bool framebuffer_devices_console_only() const;
|
||||
bool framebuffer_devices_use_bootloader_framebuffer() const;
|
||||
bool framebuffer_devices_exist() const;
|
||||
|
||||
void set_vga_text_mode_cursor(size_t console_width, size_t x, size_t y);
|
||||
void disable_vga_text_mode_console_cursor();
|
||||
void disable_vga_emulation_access_permanently();
|
||||
|
@ -55,6 +51,9 @@ private:
|
|||
NonnullRefPtrVector<GenericGraphicsAdapter> m_graphics_devices;
|
||||
RefPtr<Graphics::Console> m_console;
|
||||
|
||||
// Note: This is only used when booting with kernel commandline that includes "graphics_subsystem_mode=limited"
|
||||
RefPtr<GenericDisplayConnector> m_preset_resolution_generic_display_connector;
|
||||
|
||||
// Note: there could be multiple VGA adapters, but only one can operate in VGA mode
|
||||
RefPtr<VGACompatibleAdapter> m_vga_adapter;
|
||||
unsigned m_current_minor_number { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue