mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:57:34 +00:00
LibGfx: Remove unnecessary path members from AntiAliasingPainter
m_rotated_rectangle_path was unused and m_intersection_edge_path was cleared/free'd each time it was used. So sticking in the class just bloats the size.
This commit is contained in:
parent
2b7aa4a971
commit
754b8a643d
2 changed files with 9 additions and 13 deletions
|
@ -754,19 +754,17 @@ void AntiAliasingPainter::stroke_segment_intersection(FloatPoint const& current_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_intersection_edge_path.clear();
|
Path intersection_edge_path;
|
||||||
m_intersection_edge_path.move_to(current_rotated_90deg);
|
intersection_edge_path.move_to(current_rotated_90deg);
|
||||||
if (edge_spike_90.has_value())
|
if (edge_spike_90.has_value())
|
||||||
m_intersection_edge_path.line_to(edge_spike_90.value());
|
intersection_edge_path.line_to(edge_spike_90.value());
|
||||||
m_intersection_edge_path.line_to(previous_rotated_270deg);
|
intersection_edge_path.line_to(previous_rotated_270deg);
|
||||||
|
intersection_edge_path.line_to(current_rotated_270deg);
|
||||||
m_intersection_edge_path.line_to(current_rotated_270deg);
|
|
||||||
if (edge_spike_270.has_value())
|
if (edge_spike_270.has_value())
|
||||||
m_intersection_edge_path.line_to(edge_spike_270.value());
|
intersection_edge_path.line_to(edge_spike_270.value());
|
||||||
m_intersection_edge_path.line_to(previous_rotated_90deg);
|
intersection_edge_path.line_to(previous_rotated_90deg);
|
||||||
m_intersection_edge_path.close();
|
intersection_edge_path.close();
|
||||||
|
fill_path(intersection_edge_path, color);
|
||||||
fill_path(m_intersection_edge_path, color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// rotates a rectangle around 0,0
|
// rotates a rectangle around 0,0
|
||||||
|
|
|
@ -88,8 +88,6 @@ private:
|
||||||
|
|
||||||
Painter& m_underlying_painter;
|
Painter& m_underlying_painter;
|
||||||
AffineTransform m_transform;
|
AffineTransform m_transform;
|
||||||
Path m_intersection_edge_path;
|
|
||||||
Path m_rotated_rectangle_path;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue