diff options
author | Liav A <liavalb@gmail.com> | 2021-09-22 17:13:12 +0300 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-27 07:57:44 +0300 |
commit | 8554952690e469cc9481ea7bc8d81039a4db55a1 (patch) | |
tree | 4fe30bd4af508031d8e61c9a0efdaa9ea9e22219 /Kernel/Graphics/VirtIOGPU/Console.cpp | |
parent | 78e724a899be13b54a08e24184283d2d18ec76bf (diff) | |
download | serenity-8554952690e469cc9481ea7bc8d81039a4db55a1.zip |
Kernel + WindowServer: Re-define the interface to framebuffer devices
We create a base class called GenericFramebufferDevice, which defines
all the virtual functions that must be implemented by a
FramebufferDevice. Then, we make the VirtIO FramebufferDevice and other
FramebufferDevice implementations inherit from it.
The most important consequence of rearranging the classes is that we now
have one IOCTL method, so all drivers should be committed to not
override the IOCTL method or make their own IOCTLs of FramebufferDevice.
All graphical IOCTLs are known to all FramebufferDevices, and it's up to
the specific implementation whether to support them or discard them (so
we require extensive usage of KResult and KResultOr, together with
virtual characteristic functions).
As a result, the interface is much cleaner and understandable to read.
Diffstat (limited to 'Kernel/Graphics/VirtIOGPU/Console.cpp')
-rw-r--r-- | Kernel/Graphics/VirtIOGPU/Console.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Graphics/VirtIOGPU/Console.cpp b/Kernel/Graphics/VirtIOGPU/Console.cpp index 2ecefebf67..38d7a63a83 100644 --- a/Kernel/Graphics/VirtIOGPU/Console.cpp +++ b/Kernel/Graphics/VirtIOGPU/Console.cpp @@ -42,9 +42,9 @@ Console::Console(RefPtr<FramebufferDevice> const& framebuffer_device) enqueue_refresh_timer(); } -void Console::set_resolution(size_t width, size_t height, size_t) +void Console::set_resolution(size_t width, size_t height, size_t pitch) { - auto did_set_resolution = m_framebuffer_device->try_to_set_resolution(width, height); + auto did_set_resolution = m_framebuffer_device->set_head_resolution(0, width, height, pitch); VERIFY(!did_set_resolution.is_error()); } |