mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-10 23:49:47 +00:00
WindowServer+LibGUI: Simplify handling of paint event rects
Now that Vector<T> is convertible to Vector<T, n>, we don't have to manually copy the paint event rectangles.
This commit is contained in:
@@ -436,12 +436,7 @@ void WSClientConnection::post_paint_message(WSWindow& window)
|
||||
if (window.is_minimized() || window.is_occluded())
|
||||
return;
|
||||
|
||||
Vector<Rect> rects;
|
||||
rects.ensure_capacity(rect_set.size());
|
||||
for (auto& r : rect_set.rects()) {
|
||||
rects.append(r);
|
||||
}
|
||||
post_message(WindowClient::Paint(window.window_id(), window.size(), rects));
|
||||
post_message(WindowClient::Paint(window.window_id(), window.size(), rect_set.rects()));
|
||||
}
|
||||
|
||||
void WSClientConnection::handle(const WindowServer::InvalidateRect& message)
|
||||
|
||||
Reference in New Issue
Block a user