1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

Userland: Add FB_FLUSH ioctl for fbdev

This commit is contained in:
Sahan Fernando 2021-06-12 22:46:54 +10:00 committed by Andreas Kling
parent 34e9fa4d3b
commit 974e996d33
5 changed files with 27 additions and 0 deletions

View file

@ -316,4 +316,14 @@ void ScreenInput::on_receive_keyboard_data(::KeyEvent kernel_event)
Core::EventLoop::current().post_event(WindowManager::the(), move(message));
}
void Screen::flush_display(const Gfx::IntRect& flush_region)
{
FBRect rect {
.x = static_cast<unsigned>(flush_region.x()) * scale_factor(),
.y = static_cast<unsigned>(flush_region.y()) * scale_factor(),
.width = static_cast<unsigned>(flush_region.width()) * scale_factor(),
.height = static_cast<unsigned>(flush_region.height() * scale_factor())
};
fb_flush_buffer(m_framebuffer_fd, &rect);
}
}