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
2018-07-30 09:30:51 -07:00
committed by Facebook Github Bot
parent b1821ab4cd
commit 3499e2e0ef
29 changed files with 2034 additions and 979 deletions

View File

@@ -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;