Skip to content

Commit

Permalink
perf: Avoid unnecessary boxing enumeration in ResetRenderOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Aug 31, 2024
1 parent 8122799 commit c8d2ecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Uno.UI.Composition/Composition/ContainerVisual.skia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ internal void ResetRenderOrder()
{
_childrenInRenderOrder?.Clear();
_hasCustomRenderOrder = false;
if (Children.Any(c => c.ZIndex != 0))
if (Children.InnerList.Any(c => c.ZIndex != 0))
{
_childrenInRenderOrder ??= new List<Visual>();
// We need to sort children in ZIndex order
foreach (var child in Children.OrderBy(c => c.ZIndex))
foreach (var child in Children.InnerList.OrderBy(c => c.ZIndex))
{
_childrenInRenderOrder.Add(child);
}
Expand Down

0 comments on commit c8d2ecc

Please sign in to comment.