diff options
author | Liav A <liavalb@gmail.com> | 2022-09-24 16:55:46 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-24 15:38:56 +0100 |
commit | d5b97eb41e2b4d3497a07e809953456a59e09a68 (patch) | |
tree | 5a480f95dd2fbb05e212dd156f80f55c229a0333 /Userland | |
parent | 50ed50752f5cf0d66f8d478a006eb57a019fe954 (diff) | |
download | serenity-d5b97eb41e2b4d3497a07e809953456a59e09a68.zip |
Kernel+Userland: Provide bytes count for a DisplayConnector framebuffer
This value will be used later on by WindowServer to reject resolutions
that will request a mapping that will overflow the hardware framebuffer
max length.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibC/sys/ioctl_numbers.h | 1 | ||||
-rw-r--r-- | Userland/Services/WindowServer/HardwareScreenBackend.cpp | 1 | ||||
-rw-r--r-- | Userland/Services/WindowServer/ScreenBackend.h | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/sys/ioctl_numbers.h b/Userland/Libraries/LibC/sys/ioctl_numbers.h index c7c596f94f..df044ddf8f 100644 --- a/Userland/Libraries/LibC/sys/ioctl_numbers.h +++ b/Userland/Libraries/LibC/sys/ioctl_numbers.h @@ -24,6 +24,7 @@ struct GraphicsConnectorProperties { unsigned char flushing_support; unsigned char partial_flushing_support; unsigned char refresh_rate_support; + unsigned max_buffer_bytes; }; struct GraphicsHeadModeSetting { diff --git a/Userland/Services/WindowServer/HardwareScreenBackend.cpp b/Userland/Services/WindowServer/HardwareScreenBackend.cpp index 9c9a82b60e..dffbc0b7c2 100644 --- a/Userland/Services/WindowServer/HardwareScreenBackend.cpp +++ b/Userland/Services/WindowServer/HardwareScreenBackend.cpp @@ -33,6 +33,7 @@ ErrorOr<void> HardwareScreenBackend::open() m_can_device_flush_buffers = (properties.partial_flushing_support != 0); m_can_device_flush_entire_framebuffer = (properties.flushing_support != 0); m_can_set_head_buffer = (properties.doublebuffer_support != 0); + m_max_size_in_bytes = properties.max_buffer_bytes; return {}; } diff --git a/Userland/Services/WindowServer/ScreenBackend.h b/Userland/Services/WindowServer/ScreenBackend.h index 2e014d55ed..14870c1aa3 100644 --- a/Userland/Services/WindowServer/ScreenBackend.h +++ b/Userland/Services/WindowServer/ScreenBackend.h @@ -43,6 +43,7 @@ public: Gfx::ARGB32* m_framebuffer { nullptr }; size_t m_size_in_bytes { 0 }; + size_t m_max_size_in_bytes { 0 }; size_t m_back_buffer_offset { 0 }; int m_pitch { 0 }; |