From f772e5fb5a09c0fdb30a916a0eb21b04a1a73524 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 4 Jun 2022 01:19:31 +0300 Subject: [PATCH] Don't transitively activate server objects, only objects directly attached to a composition target should receive updates --- .../Rendering/Composition/Server/ServerObject.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs b/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs index dde711c3b5..f55c9439e4 100644 --- a/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs +++ b/src/Avalonia.Base/Rendering/Composition/Server/ServerObject.cs @@ -92,15 +92,13 @@ namespace Avalonia.Rendering.Composition.Server public void SubscribeToInvalidation(int member, IAnimationInstance animation) { ref var store = ref GetStoreFromOffset(member); - if (store.Subscribers.AddRef(animation)) - Activate(); + store.Subscribers.AddRef(animation); } public void UnsubscribeFromInvalidation(int member, IAnimationInstance animation) { ref var store = ref GetStoreFromOffset(member); - if (store.Subscribers.ReleaseRef(animation)) - Deactivate(); + store.Subscribers.ReleaseRef(animation); } public virtual int? GetFieldOffset(string fieldName) => null;