Browse Source

Visiblity check fix

pull/8105/head
Nikita Tsukanov 4 years ago
parent
commit
f0989357a0
  1. 4
      src/Avalonia.Base/Rendering/Composition/Visual.cs

4
src/Avalonia.Base/Rendering/Composition/Visual.cs

@ -45,8 +45,8 @@ namespace Avalonia.Rendering.Composition
var i = Root.Server.Readback; var i = Root.Server.Readback;
ref var readback = ref Server.GetReadback(i.ReadIndex); ref var readback = ref Server.GetReadback(i.ReadIndex);
// CompositionVisual wasn't visible // CompositionVisual wasn't visible or wasn't even attached to the composition target during the lat frame
if (readback.Revision < i.ReadRevision) if (!readback.Visible || readback.Revision < i.ReadRevision)
return null; return null;
// CompositionVisual was reparented (potential race here) // CompositionVisual was reparented (potential race here)

Loading…
Cancel
Save