1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:27:45 +00:00

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.
This commit is contained in:
Andreas Kling 2023-05-14 18:55:16 +02:00
parent def37e65f3
commit 984630845d

View file

@ -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)