mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 11:36:22 +00:00
LibGfx: Painter::draw_line() can just return early if alpha == 0
This commit is contained in:
parent
502b5b76c8
commit
d51c1c136e
Notes:
sideshowbarker
2024-07-19 05:39:44 +09:00
Author: https://github.com/awesomekling
Commit: d51c1c136e
1 changed files with 3 additions and 0 deletions
|
@ -1114,6 +1114,9 @@ void Painter::draw_pixel(const IntPoint& position, Color color, int thickness)
|
||||||
|
|
||||||
void Painter::draw_line(const IntPoint& p1, const IntPoint& p2, Color color, int thickness, LineStyle style)
|
void Painter::draw_line(const IntPoint& p1, const IntPoint& p2, Color color, int thickness, LineStyle style)
|
||||||
{
|
{
|
||||||
|
if (color.alpha() == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
auto clip_rect = this->clip_rect();
|
auto clip_rect = this->clip_rect();
|
||||||
|
|
||||||
auto point1 = p1;
|
auto point1 = p1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue