Skip to content

Commit

Permalink
fix: re-use of native path instances and further optimizations, accep…
Browse files Browse the repository at this point in the history
…ted review suggestion
  • Loading branch information
queequac committed Jun 21, 2022
1 parent ba689d3 commit 8d6c5fd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/Uno.UI/UI/Xaml/Shapes/Shape.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,8 @@ private Windows.Foundation.Rect GetPathBoundingBox(Android.Graphics.Path path)

protected Android.Graphics.Path GetOrCreatePath()
{
Android.Graphics.Path path;
if (_path != null)
{
path = _path;
path.Reset();
}
else
{
path = new Android.Graphics.Path();
}
return path;
_path?.Reset();
return _path ?? new Android.Graphics.Path();
}

protected Windows.Foundation.Rect TransformToLogical(Windows.Foundation.Rect renderingArea)
Expand Down

0 comments on commit 8d6c5fd

Please sign in to comment.