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

LibWeb: Skip painting of empty borders in GPU painter

This commit is contained in:
Aliaksandr Kalenik 2023-11-21 15:20:17 +01:00 committed by Andreas Kling
parent 01058dac95
commit 2471f07356

View file

@ -263,10 +263,14 @@ CommandResult PaintingCommandExecutorGPU::paint_borders(DevicePixelRect const& b
border_rect.height()
};
painter().fill_rect(top_border_rect, borders_data.top.color);
painter().fill_rect(right_border_rect, borders_data.right.color);
painter().fill_rect(bottom_border_rect, borders_data.bottom.color);
painter().fill_rect(left_border_rect, borders_data.left.color);
if (borders_data.top.width > 0)
painter().fill_rect(top_border_rect, borders_data.top.color);
if (borders_data.right.width > 0)
painter().fill_rect(right_border_rect, borders_data.right.color);
if (borders_data.bottom.width > 0)
painter().fill_rect(bottom_border_rect, borders_data.bottom.color);
if (borders_data.left.width > 0)
painter().fill_rect(left_border_rect, borders_data.left.color);
return CommandResult::Continue;
}