I am developing a xamarin forms application right now and I have some problems with hardware acceleration.
Specifically, in the android emulator, hardware acceleration works, ie
System.Numerics.Vector.IsHardwareAccelerated
returns true.
On the device however, it returns false, and thus libraries like ImageSharp are super slow.
I already checked the build settings and "Optimize code" is checked everywhere. Also I added HardwareAccelerated = true
to the MainActivity.cs in the android project, but that doesn't change anything.
Anybody can help?
EDIT:
The emulator is running on api level 25 (android 7.1), in the emulator it is working with debug configuration.
The device is running android 8.1, api level 27, and only release build work there at all.
EDIT:
According to @SushiHangover there is no Hardware acceleration support for System.Numerics.Vector for arm platforms implemented in Mono. Also, see here: https://github.com/SixLabors/ImageSharp/issues/94
Cheers, Johannes