Make two separate yoga targets for QE
Reviewed By: emilsjolander Differential Revision: D7059278 fbshipit-source-id: dd11b018edc8ea930d5eba09c6c01e349bb8b63c
This commit is contained in:
parent
006b77f1ae
commit
af9d6479e5
|
@ -16,7 +16,11 @@ public class YogaConfig {
|
||||||
public static int SPACING_TYPE = 1;
|
public static int SPACING_TYPE = 1;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
SoLoader.loadLibrary("yoga");
|
if (YogaConstants.shouldUseFastMath) {
|
||||||
|
SoLoader.loadLibrary("yogafastmath");
|
||||||
|
} else {
|
||||||
|
SoLoader.loadLibrary("yoga");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long mNativePointer;
|
long mNativePointer;
|
||||||
|
|
|
@ -11,6 +11,8 @@ public class YogaConstants {
|
||||||
|
|
||||||
public static final float UNDEFINED = Float.NaN;
|
public static final float UNDEFINED = Float.NaN;
|
||||||
|
|
||||||
|
public static boolean shouldUseFastMath = false;
|
||||||
|
|
||||||
public static boolean isUndefined(float value) {
|
public static boolean isUndefined(float value) {
|
||||||
return Float.compare(value, UNDEFINED) == 0;
|
return Float.compare(value, UNDEFINED) == 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,11 @@ import javax.annotation.Nullable;
|
||||||
public class YogaNode implements Cloneable {
|
public class YogaNode implements Cloneable {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
SoLoader.loadLibrary("yoga");
|
if (YogaConstants.shouldUseFastMath) {
|
||||||
|
SoLoader.loadLibrary("yogafastmath");
|
||||||
|
} else {
|
||||||
|
SoLoader.loadLibrary("yoga");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue