Browse Source
Reset expected commit callback timing after waiting for app exiting idle (#21157)
pull/21228/head
Nikita Tsukanov
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
0 deletions
-
src/Windows/Avalonia.Win32/WinRT/Composition/WinUiCompositorConnection.cs
|
|
|
@ -127,7 +127,12 @@ internal class WinUiCompositorConnection : IRenderTimer, Win32.IWindowsSurfaceFa |
|
|
|
// Always schedule a commit so the current frame's work reaches DWM.
|
|
|
|
ScheduleNextCommit(); |
|
|
|
if (_parent._stopped) |
|
|
|
{ |
|
|
|
_parent._wakeEvent.WaitOne(); |
|
|
|
// Reset the expected commit callback time since we've paused
|
|
|
|
// the render loop due to app being idle
|
|
|
|
_commitDueAt = _st.Elapsed + TimeSpan.FromSeconds(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void ScheduleNextCommit() |
|
|
|
|