Bläddra i källkod

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.
MacDue 2 år sedan
förälder
incheckning
754b8a643d

+ 9 - 11
Userland/Libraries/LibGfx/AntiAliasingPainter.cpp

@@ -754,19 +754,17 @@ void AntiAliasingPainter::stroke_segment_intersection(FloatPoint const& current_
         }
         }
     }
     }
 
 
-    m_intersection_edge_path.clear();
-    m_intersection_edge_path.move_to(current_rotated_90deg);
+    Path intersection_edge_path;
+    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());
-    m_intersection_edge_path.line_to(previous_rotated_270deg);
-
-    m_intersection_edge_path.line_to(current_rotated_270deg);
+        intersection_edge_path.line_to(edge_spike_90.value());
+    intersection_edge_path.line_to(previous_rotated_270deg);
+    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());
-    m_intersection_edge_path.line_to(previous_rotated_90deg);
-    m_intersection_edge_path.close();
-
-    fill_path(m_intersection_edge_path, color);
+        intersection_edge_path.line_to(edge_spike_270.value());
+    intersection_edge_path.line_to(previous_rotated_90deg);
+    intersection_edge_path.close();
+    fill_path(intersection_edge_path, color);
 }
 }
 
 
 // rotates a rectangle around 0,0
 // rotates a rectangle around 0,0

+ 0 - 2
Userland/Libraries/LibGfx/AntiAliasingPainter.h

@@ -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;
 };
 };
 
 
 }
 }