From 8ee8eaa66e8d9c64dc2581f54e42d55e9eda83fc Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Sat, 10 May 2025 02:02:17 -0700 Subject: [PATCH] delete stale references/includes to classes no longer used (#168616) Simple code pruning. While scanning the sources for unused code I found a few stale references to classes that were already no longer being used. --- engine/src/flutter/display_list/dl_builder.cc | 1 - .../display_list/effects/dl_image_filter_unittests.cc | 5 ++--- .../impeller/entity/contents/line_contents_unittests.cc | 1 - .../impeller/entity/contents/solid_rrect_blur_contents.h | 4 ---- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/engine/src/flutter/display_list/dl_builder.cc b/engine/src/flutter/display_list/dl_builder.cc index dcc706cd7a7..a8011d8a355 100644 --- a/engine/src/flutter/display_list/dl_builder.cc +++ b/engine/src/flutter/display_list/dl_builder.cc @@ -1801,7 +1801,6 @@ bool DisplayListBuilder::AdjustBoundsForPaint(DlRect& bounds, if (flags.is_geometric()) { bool is_stroked = flags.is_stroked(current_.getDrawStyle()); - // Path effect occurs before stroking... DisplayListSpecialGeometryFlags special_flags = flags.GeometryFlags(is_stroked); diff --git a/engine/src/flutter/display_list/effects/dl_image_filter_unittests.cc b/engine/src/flutter/display_list/effects/dl_image_filter_unittests.cc index 0b2c8b67f52..dc1b94aeecf 100644 --- a/engine/src/flutter/display_list/effects/dl_image_filter_unittests.cc +++ b/engine/src/flutter/display_list/effects/dl_image_filter_unittests.cc @@ -16,7 +16,6 @@ #include "gtest/gtest.h" #include "include/core/SkMatrix.h" -#include "include/core/SkRect.h" #include "third_party/skia/include/core/SkBlendMode.h" #include "third_party/skia/include/core/SkColorFilter.h" #include "third_party/skia/include/core/SkSamplingOptions.h" @@ -25,13 +24,13 @@ namespace flutter { namespace testing { -// SkRect::contains treats the rect as a half-open interval which is +// DlRect::Contains treats the rect as a half-open interval which is // appropriate for so many operations. Unfortunately, we are using // it here to test containment of the corners of a transformed quad // so the corners of the quad that are measured against the right // and bottom edges are contained even if they are on the right or // bottom edge. This method does the "all sides inclusive" version -// of SkRect::contains. +// of DlRect::Contains. static bool containsInclusive(const DlRect rect, const DlPoint p) { // Test with a slight offset of 1E-9 to "forgive" IEEE bit-rounding // Ending up with bounds that are off by 1E-9 (these numbers are all diff --git a/engine/src/flutter/impeller/entity/contents/line_contents_unittests.cc b/engine/src/flutter/impeller/entity/contents/line_contents_unittests.cc index b5f86e280de..da637e07378 100644 --- a/engine/src/flutter/impeller/entity/contents/line_contents_unittests.cc +++ b/engine/src/flutter/impeller/entity/contents/line_contents_unittests.cc @@ -35,7 +35,6 @@ float CalculateLine(const LineVertexShader::PerVertexData& per_vertex, } // namespace TEST(LineContents, Create) { - Path path; Scalar width = 5.0f; auto geometry = std::make_unique( /*p0=*/Point{0, 0}, // diff --git a/engine/src/flutter/impeller/entity/contents/solid_rrect_blur_contents.h b/engine/src/flutter/impeller/entity/contents/solid_rrect_blur_contents.h index f396d0487ab..d0aa55890ba 100644 --- a/engine/src/flutter/impeller/entity/contents/solid_rrect_blur_contents.h +++ b/engine/src/flutter/impeller/entity/contents/solid_rrect_blur_contents.h @@ -15,10 +15,6 @@ namespace impeller { -class Path; -class HostBuffer; -struct VertexBuffer; - /// @brief Draws a fast solid color blur of an rounded rectangle. Only supports /// RRects with fully symmetrical radii. Also produces correct results for /// rectangles (corner_radius=0) and circles (corner_radius=width/2=height/2).