Browse Source
Merge pull request #11605 from AvaloniaUI/fixes/compositor-commit-issues
Fixes for compositor commit issues
comp-size-implicitanim-repro
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
3 deletions
-
src/Avalonia.Base/Media/MediaContext.Compositor.cs
-
src/Avalonia.Base/Rendering/Composition/Compositor.cs
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Avalonia.Platform; |
|
|
|
using Avalonia.Rendering.Composition; |
|
|
|
@ -78,7 +79,7 @@ partial class MediaContext |
|
|
|
// Nothing to do, and there are no pending commits
|
|
|
|
return false; |
|
|
|
|
|
|
|
foreach (var c in _requestedCommits) |
|
|
|
foreach (var c in _requestedCommits.ToArray()) |
|
|
|
CommitCompositor(c); |
|
|
|
|
|
|
|
_requestedCommits.Clear(); |
|
|
|
|
|
|
|
@ -130,7 +130,7 @@ namespace Avalonia.Rendering.Composition |
|
|
|
Dispatcher.UIThread.VerifyAccess(); |
|
|
|
using var noPump = NonPumpingLockHelper.Use(); |
|
|
|
|
|
|
|
_nextCommit ??= new(); |
|
|
|
var commit = _nextCommit ??= new(); |
|
|
|
|
|
|
|
(_invokeBeforeCommitRead, _invokeBeforeCommitWrite) = (_invokeBeforeCommitWrite, _invokeBeforeCommitRead); |
|
|
|
while (_invokeBeforeCommitRead.Count > 0) |
|
|
|
@ -188,7 +188,7 @@ namespace Avalonia.Rendering.Composition |
|
|
|
}, TaskContinuationOptions.ExecuteSynchronously); |
|
|
|
_nextCommit = null; |
|
|
|
|
|
|
|
return _pendingBatch; |
|
|
|
return commit; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|