From 72ea712ff97c207cd8f97ee8994a571409bcd389 Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Fri, 1 Dec 2023 09:39:29 -0800 Subject: [PATCH] [Impeller] Fix size of squares in DrawPoints(PointMode). (flutter/engine#48547) Fixes: https://github.com/flutter/flutter/issues/138877 The existing golden tests were already showing this bug, but we didn't see it. With this fix the size of the squares should be the same as the circle for the round caps in the DrawPoints playground goldens. Test exemption request: This fix is covered by existing golden tests. --- .../flutter/impeller/entity/geometry/point_field_geometry.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/impeller/entity/geometry/point_field_geometry.cc b/engine/src/flutter/impeller/entity/geometry/point_field_geometry.cc index dfc97059dac..ebbf78af8f5 100644 --- a/engine/src/flutter/impeller/entity/geometry/point_field_geometry.cc +++ b/engine/src/flutter/impeller/entity/geometry/point_field_geometry.cc @@ -181,7 +181,7 @@ GeometryResult PointFieldGeometry::GetPositionBufferGPU( PS::FrameInfo frame_info; frame_info.count = points_.size(); - frame_info.radius = radius; + frame_info.radius = round_ ? radius : radius * kSqrt2; frame_info.radian_start = round_ ? 0.0f : kPiOver4; frame_info.radian_step = k2Pi / vertices_per_geom; frame_info.points_per_circle = points_per_circle;