1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +00:00

WindowServer: Prepare dirty rects if only the frame was invalidated

This commit is contained in:
Tom 2021-03-02 21:10:48 -07:00 committed by Andreas Kling
parent 5e7abea31e
commit c57d719d62

View file

@ -576,6 +576,14 @@ void Window::prepare_dirty_rects()
m_dirty_rects = rect();
} else {
m_dirty_rects.move_by(frame().render_rect().location());
if (m_invalidated_frame) {
if (m_invalidated) {
m_dirty_rects.add(frame().render_rect());
} else {
for (auto& rects : frame().render_rect().shatter(rect()))
m_dirty_rects.add(rects);
}
}
}
}