Render: Performance fix

This commit is contained in:
Liza 2023-11-26 22:14:04 +01:00
parent 964119cfd2
commit 0d1882d97f
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -176,7 +176,15 @@ internal sealed class FrameworkService : IDisposable
foreach (var location in memoryTerritory.Locations)
{
bool isEnabled = DetermineVisibility(location, visibleLocations);
if (location.RenderElement == null || !location.RenderElement.IsValid)
if (location.RenderElement == null)
{
if (isEnabled)
return true;
else
continue;
}
if (!location.RenderElement.IsValid)
return true;
if (location.RenderElement.Enabled != isEnabled)