summaryrefslogtreecommitdiff
path: root/Widgets
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-12 16:41:03 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-12 16:41:03 +0100
commit84ae4e58806b04d51d864477b10f0ce02e490df8 (patch)
treedca7a01a4d3e62281817c3ca1345b6e488d4f735 /Widgets
parent8d78b0a8dfd5bd6d513f615c238c75a7855382a1 (diff)
downloadserenity-84ae4e58806b04d51d864477b10f0ce02e490df8.zip
WindowManager should only flush pixels inside the screen rect.
Diffstat (limited to 'Widgets')
-rw-r--r--Widgets/WindowManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Widgets/WindowManager.cpp b/Widgets/WindowManager.cpp
index a45f3483f2..ceb863e174 100644
--- a/Widgets/WindowManager.cpp
+++ b/Widgets/WindowManager.cpp
@@ -351,9 +351,10 @@ void WindowManager::invalidate(const Window& window)
invalidate(outerRectForWindow(window.rect()));
}
-void WindowManager::flush(const Rect& rect)
+void WindowManager::flush(const Rect& a_rect)
{
auto& framebuffer = FrameBuffer::the();
+ auto rect = Rect::intersection(a_rect, framebuffer.rect());
for (int y = rect.top(); y <= rect.bottom(); ++y) {
auto* front_scanline = m_front_bitmap->scanline(y);