mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
WindowManager should only flush pixels inside the screen rect.
This commit is contained in:
parent
8d78b0a8df
commit
84ae4e5880
Notes:
sideshowbarker
2024-07-19 16:04:11 +09:00
Author: https://github.com/awesomekling
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