Browse Source
Fix: ChoreographerTimer should check for Android version correctly. (#19643)
pull/19650/head
Isabelle Santin
8 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
3 deletions
-
src/Android/Avalonia.Android/ChoreographerTimer.cs
-
src/Android/Avalonia.Android/Platform/SkiaPlatform/AndroidFramebuffer.cs
|
|
|
@ -13,7 +13,7 @@ namespace Avalonia.Android |
|
|
|
{ |
|
|
|
internal sealed class ChoreographerTimer : IRenderTimer |
|
|
|
{ |
|
|
|
private static readonly bool s_supports64Callback = OperatingSystem.IsAndroidVersionAtLeast(10); |
|
|
|
private static readonly bool s_supports64Callback = OperatingSystem.IsAndroidVersionAtLeast(29); |
|
|
|
private readonly object _lock = new(); |
|
|
|
private readonly TaskCompletionSource<IntPtr> _choreographer = new(); |
|
|
|
private readonly AutoResetEvent _event = new(false); |
|
|
|
|
|
|
|
@ -65,12 +65,12 @@ namespace Avalonia.Android.Platform.SkiaPlatform |
|
|
|
internal static extern IntPtr AChoreographer_getInstance(); |
|
|
|
|
|
|
|
[DllImport("android")] |
|
|
|
[UnsupportedOSPlatform("android10.0")] |
|
|
|
[UnsupportedOSPlatform("android29.0")] |
|
|
|
internal static extern void AChoreographer_postFrameCallback( |
|
|
|
IntPtr choreographer, delegate* unmanaged<int, IntPtr, void> callback, IntPtr data); |
|
|
|
|
|
|
|
[DllImport("android")] |
|
|
|
[SupportedOSPlatform("android10.0")] |
|
|
|
[SupportedOSPlatform("android29.0")] |
|
|
|
internal static extern void AChoreographer_postFrameCallback64( |
|
|
|
IntPtr choreographer, delegate* unmanaged<long, IntPtr, void> callback, IntPtr data); |
|
|
|
|
|
|
|
|