LibWeb: Do not unnecessarily construct Colors in PaintableBox::paint()

No functional changes.
This commit is contained in:
Jelle Raaijmakers 2025-08-19 12:58:18 +02:00 committed by Jelle Raaijmakers
commit e421b34e14
Notes: github-actions[bot] 2025-08-19 19:55:22 +00:00

View file

@ -513,8 +513,8 @@ void PaintableBox::paint(DisplayListRecordingContext& context, PaintPhase phase)
auto paint_inspector_rect = [&](CSSPixelRect const& rect, Color color) {
auto device_rect = context.enclosing_device_rect(rect).to_type<int>();
context.display_list_recorder().fill_rect(device_rect, Color(color).with_alpha(100));
context.display_list_recorder().draw_rect(device_rect, Color(color));
context.display_list_recorder().fill_rect(device_rect, color.with_alpha(100));
context.display_list_recorder().draw_rect(device_rect, color);
};
paint_inspector_rect(margin_rect, Color::Yellow);