mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibGfx: Return early from Painter::draw_line() if clip rect is empty
This commit is contained in:
parent
3dd6638177
commit
57404bae1f
Notes:
sideshowbarker
2024-07-17 01:53:23 +09:00
Author: https://github.com/awesomekling
Commit: 57404bae1f
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
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)
|
if (thickness <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue