mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
WindowManager should only flush pixels inside the screen rect.
This commit is contained in:
parent
8d78b0a8df
commit
84ae4e5880
1 changed files with 2 additions and 1 deletions
|
@ -351,9 +351,10 @@ void WindowManager::invalidate(const Window& window)
|
||||||
invalidate(outerRectForWindow(window.rect()));
|
invalidate(outerRectForWindow(window.rect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::flush(const Rect& rect)
|
void WindowManager::flush(const Rect& a_rect)
|
||||||
{
|
{
|
||||||
auto& framebuffer = FrameBuffer::the();
|
auto& framebuffer = FrameBuffer::the();
|
||||||
|
auto rect = Rect::intersection(a_rect, framebuffer.rect());
|
||||||
|
|
||||||
for (int y = rect.top(); y <= rect.bottom(); ++y) {
|
for (int y = rect.top(); y <= rect.bottom(); ++y) {
|
||||||
auto* front_scanline = m_front_bitmap->scanline(y);
|
auto* front_scanline = m_front_bitmap->scanline(y);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue