Add YogaNodeProperties implementation based on ByteBuffer

Summary:
@public
Adds an implementation of `YogaNodeProperties` that accesses style and layout properties using a `ByteBuffer` rather than JNI calls.
We hope for a speed improvement.

This needs further cleanup after experimenting, e.g. to codegen the offsets.

Reviewed By: pasqualeanatriello

Differential Revision: D8911723

fbshipit-source-id: 3c24b57eb545155878896ebb5d64d4553eb6bedc
This commit is contained in:
David Aurelio authored and Facebook Github Bot committed 2018-07-30 09:33:10 -07:00
1 parent 930bf1614c
commit 0c97e75dfe
7 files changed
+749 -19

No files matched your search

@@ -33,7 +33,9 @@ public class YogaValue {
if (other instanceof YogaValue) {
final YogaValue otherValue = (YogaValue) other;
if (unit == otherValue.unit) {
return unit == YogaUnit.UNDEFINED || Float.compare(value, otherValue.value) == 0;
return unit == YogaUnit.UNDEFINED
|| unit == YogaUnit.AUTO
|| Float.compare(value, otherValue.value) == 0;
}
}
return false;