소스 검색

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 년 전
부모
커밋
754b8a643d
2개의 변경된 파일9개의 추가작업 그리고 13개의 파일을 삭제
  1. 9 11
      Userland/Libraries/LibGfx/AntiAliasingPainter.cpp
  2. 0 2
      Userland/Libraries/LibGfx/AntiAliasingPainter.h

+ 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())
-        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())
-        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

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

@@ -88,8 +88,6 @@ private:
 
     Painter& m_underlying_painter;
     AffineTransform m_transform;
-    Path m_intersection_edge_path;
-    Path m_rotated_rectangle_path;
 };
 
 }