summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-05-14 18:55:16 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-15 10:04:29 +0200
commit984630845d083d61b08dfccdd1813009767d9f6a (patch)
tree7af9d5860e9d99302163dee790963115dd3e6bb5
parentdef37e65f38d51cd8d7f4f63a9075c7921280f6d (diff)
downloadserenity-984630845d083d61b08dfccdd1813009767d9f6a.zip
Ladybird: Only request repaint for what's in the visible viewport
Before this change, we asked WebContent to fill the whole shared bitmap with content, even if we couldn't show it all in the viewport.
-rw-r--r--Ladybird/WebContentView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Ladybird/WebContentView.cpp b/Ladybird/WebContentView.cpp
index b761e1af87..54d793b35d 100644
--- a/Ladybird/WebContentView.cpp
+++ b/Ladybird/WebContentView.cpp
@@ -1105,7 +1105,7 @@ void WebContentView::request_repaint()
return;
}
m_client_state.back_bitmap.pending_paints++;
- client().async_paint(m_client_state.back_bitmap.bitmap->rect().translated(horizontalScrollBar()->value(), verticalScrollBar()->value()), m_client_state.back_bitmap.id);
+ client().async_paint(m_viewport_rect, m_client_state.back_bitmap.id);
}
bool WebContentView::event(QEvent* event)