Browse Source

Fixed animations

pull/11557/head
Nikita Tsukanov 3 years ago
parent
commit
e9ca33d283
  1. 13
      src/Avalonia.Base/Media/MediaContext.Compositor.cs

13
src/Avalonia.Base/Media/MediaContext.Compositor.cs

@ -43,13 +43,20 @@ partial class MediaContext
if (_scheduleCommitOnLastCompositionBatchCompletion) if (_scheduleCommitOnLastCompositionBatchCompletion)
{ {
_scheduleCommitOnLastCompositionBatchCompletion = false; _scheduleCommitOnLastCompositionBatchCompletion = false;
CommitCompositorsWithThrottling(); if (!CommitCompositorsWithThrottling())
ScheduleRenderForAnimationsIfNeeded();
} }
// Check if there are active animations and schedule the next render // Check if there are active animations and schedule the next render
else if(_clock.HasSubscriptions) else
ScheduleRender(false); ScheduleRenderForAnimationsIfNeeded();
} }
}
void ScheduleRenderForAnimationsIfNeeded()
{
if (_clock.HasSubscriptions)
ScheduleRender(false);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save