Use direct access to YogaConfig mNativePointer parameter

Summary:
Use direct access to YogaConfig mNativePointer parameter

Results:
```
The following primary metrics showed statistically significant changes at the 95% confidence level:
javaFullLifecycleAllocateCalculateReadLayout	-1.25%
javaLayoutReading	0.44%
javaYogaNodeAllocateAndSetProps	-1.92%
javaYogaNodeAllocation	-2.11%
javaYogaNodeStylePropAssignment	-0.89%
```

Differential Revision: D17519542

fbshipit-source-id: c39bfe1b0ecae9149dc6da2a0a7e936df215ec5b
This commit is contained in:
Amir Shalem
2019-09-22 13:46:35 -07:00
committed by Facebook Github Bot
parent 36eae205e1
commit f1baf8336b
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ package com.facebook.yoga;
public abstract class YogaConfigJNIBase extends YogaConfig {
protected long mNativePointer;
long mNativePointer;
private YogaLogger mLogger;
private YogaConfigJNIBase(long nativePointer) {

View File

@@ -58,7 +58,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
}
YogaNodeJNIBase(YogaConfig config) {
this(YogaNative.jni_YGNodeNewWithConfig(config.getNativePointer()));
this(YogaNative.jni_YGNodeNewWithConfig(((YogaConfigJNIBase)config).mNativePointer));
}
public void reset() {