Commit 25d8fb44 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add method to know if asm optimisations are available.

parent e4edf9a9
...@@ -93,12 +93,15 @@ public class Version { ...@@ -93,12 +93,15 @@ public class Version {
public static boolean hasFastCpu() { public static boolean hasFastCpu() {
return isArmv7() || isX86(); return isArmv7() || isX86();
} }
public static boolean hasFastCpuWithAsmOptim() {
return (isArmv7() && hasNeon()) || isX86();
}
public static boolean isVideoCapable() { public static boolean isVideoCapable() {
return !Version.sdkStrictlyBelow(5) && Version.hasFastCpu() && Hacks.hasCamera(); return !Version.sdkStrictlyBelow(5) && Version.hasFastCpu() && Hacks.hasCamera();
} }
public static boolean isHDVideoCapable() { public static boolean isHDVideoCapable() {
int availableCores = Runtime.getRuntime().availableProcessors(); int availableCores = Runtime.getRuntime().availableProcessors();
return isVideoCapable() && (availableCores > 1); return isVideoCapable() && hasFastCpuWithAsmOptim() && (availableCores > 1);
} }
private static Boolean sCacheHasZrtp; private static Boolean sCacheHasZrtp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment