mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 19:56:30 +00:00
LibWeb: Do not unnecessarily construct Colors in PaintableBox::paint()
No functional changes.
This commit is contained in:
parent
a83815360c
commit
e421b34e14
Notes:
github-actions[bot]
2025-08-19 19:55:22 +00:00
Author: https://github.com/gmta
Commit: e421b34e14
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5911
1 changed files with 2 additions and 2 deletions
|
@ -513,8 +513,8 @@ void PaintableBox::paint(DisplayListRecordingContext& context, PaintPhase phase)
|
||||||
|
|
||||||
auto paint_inspector_rect = [&](CSSPixelRect const& rect, Color color) {
|
auto paint_inspector_rect = [&](CSSPixelRect const& rect, Color color) {
|
||||||
auto device_rect = context.enclosing_device_rect(rect).to_type<int>();
|
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().fill_rect(device_rect, color.with_alpha(100));
|
||||||
context.display_list_recorder().draw_rect(device_rect, Color(color));
|
context.display_list_recorder().draw_rect(device_rect, color);
|
||||||
};
|
};
|
||||||
|
|
||||||
paint_inspector_rect(margin_rect, Color::Yellow);
|
paint_inspector_rect(margin_rect, Color::Yellow);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue