Add YogaNodeProperties
implementation with ByteBuffer
based setters
Summary: @public Adds an implementation of `YogaNodeProperties` that sets style properties using a `ByteBuffer` rather than JNI calls. We hope for a speed improvement. Reviewed By: pasqualeanatriello Differential Revision: D9042225 fbshipit-source-id: c7f2b24eaeddd1190755bec85a5034079bd2f492
This commit is contained in:
committed by
Facebook Github Bot
parent
3499e2e0ef
commit
78d6988461
@@ -33,6 +33,12 @@ struct JYogaNodePropertiesByteBuffer
|
||||
"Lcom/facebook/yoga/YogaNodePropertiesByteBuffer";
|
||||
};
|
||||
|
||||
struct JYogaNodePropertiesHybrid
|
||||
: public JavaClass<JYogaNodePropertiesHybrid, JYogaNodePropertiesJNI> {
|
||||
static constexpr auto kJavaDescriptor =
|
||||
"Lcom/facebook/yoga/YogaNodePropertiesHybrid";
|
||||
};
|
||||
|
||||
struct YGConfigContext {
|
||||
global_ref<jobject>* logger;
|
||||
global_ref<jobject>* config;
|
||||
@@ -858,5 +864,10 @@ jint JNI_OnLoad(JavaVM* vm, void*) {
|
||||
YGMakeNativeMethod(jni_getStyleBuffer),
|
||||
YGMakeNativeMethod(jni_getLayoutBuffer),
|
||||
});
|
||||
registerNatives(
|
||||
"com/facebook/yoga/YogaNodePropertiesHybrid",
|
||||
{
|
||||
YGMakeNativeMethod(jni_getStyleBuffer),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user