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

LibGfx: Return early from Painter::draw_line() if clip rect is empty

This commit is contained in:
Andreas Kling 2023-06-26 08:05:12 +02:00
parent 3dd6638177
commit 57404bae1f

View file

@ -2000,6 +2000,9 @@ void Painter::draw_physical_pixel(IntPoint physical_position, Color color, int t
void Painter::draw_line(IntPoint a_p1, IntPoint a_p2, Color color, int thickness, LineStyle style, Color alternate_color)
{
if (clip_rect().is_empty())
return;
if (thickness <= 0)
return;