@@ -683,83 +683,6 @@ static void jni_YGNodeSetHasMeasureFuncJNI(
683683 static_cast <bool >(hasMeasureFunc) ? YGJNIMeasureFunc : nullptr );
684684}
685685
686- static YGSize YGJNIMinContentMeasureFunc (
687- YGNodeConstRef node,
688- float width,
689- YGMeasureMode widthMode,
690- float height,
691- YGMeasureMode heightMode) {
692- if (auto obj = YGNodeJobject (node)) {
693- YGTransferLayoutDirection (node, obj.get ());
694- JNIEnv* env = getCurrentEnv ();
695- auto objectClass = facebook::yoga::vanillajni::make_local_ref (
696- env, env->GetObjectClass (obj.get ()));
697- // NOLINTNEXTLINE(misc-misplaced-const)
698- static const jmethodID methodId = facebook::yoga::vanillajni::getMethodId (
699- env, objectClass.get (), " measureMinContent" , " (FIFI)J" );
700- // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
701- const auto measureResult = facebook::yoga::vanillajni::callLongMethod (
702- env, obj.get (), methodId, width, widthMode, height, heightMode);
703-
704- uint32_t wBits = 0xFFFFFFFF & (measureResult >> 32 );
705- uint32_t hBits = 0xFFFFFFFF & measureResult;
706- auto measuredWidth = std::bit_cast<float >(wBits);
707- auto measuredHeight = std::bit_cast<float >(hBits);
708-
709- return YGSize{measuredWidth, measuredHeight};
710- } else {
711- return YGSize{
712- widthMode == YGMeasureModeUndefined ? 0 : width,
713- heightMode == YGMeasureModeUndefined ? 0 : height,
714- };
715- }
716- }
717-
718- static void jni_YGNodeSetHasMinContentMeasureFuncJNI (
719- JNIEnv* /* env*/ ,
720- jobject /* obj*/ ,
721- jlong nativePointer,
722- jboolean hasMinContentMeasureFunc) {
723- YGNodeSetMinContentMeasureFunc (
724- _jlong2YGNodeRef (nativePointer),
725- static_cast <bool >(hasMinContentMeasureFunc) ? YGJNIMinContentMeasureFunc
726- : nullptr );
727- }
728-
729- static void jni_YGNodeSetMinContentWidthJNI (
730- JNIEnv* /* env*/ ,
731- jobject /* obj*/ ,
732- jlong nativePointer,
733- jfloat minContentWidth) {
734- YGNodeSetMinContentWidth (
735- _jlong2YGNodeRef (nativePointer), static_cast <float >(minContentWidth));
736- }
737-
738- static void jni_YGNodeSetMinContentHeightJNI (
739- JNIEnv* /* env*/ ,
740- jobject /* obj*/ ,
741- jlong nativePointer,
742- jfloat minContentHeight) {
743- YGNodeSetMinContentHeight (
744- _jlong2YGNodeRef (nativePointer), static_cast <float >(minContentHeight));
745- }
746-
747- static jfloat jni_YGNodeGetMinContentWidthJNI (
748- JNIEnv* /* env*/ ,
749- jobject /* obj*/ ,
750- jlong nativePointer) {
751- return static_cast <jfloat>(
752- YGNodeGetMinContentWidth (_jlong2YGNodeRef (nativePointer)));
753- }
754-
755- static jfloat jni_YGNodeGetMinContentHeightJNI (
756- JNIEnv* /* env*/ ,
757- jobject /* obj*/ ,
758- jlong nativePointer) {
759- return static_cast <jfloat>(
760- YGNodeGetMinContentHeight (_jlong2YGNodeRef (nativePointer)));
761- }
762-
763686static float YGJNIBaselineFunc (YGNodeConstRef node, float width, float height) {
764687 if (auto obj = YGNodeJobject (node)) {
765688 JNIEnv* env = getCurrentEnv ();
@@ -1135,23 +1058,6 @@ static JNINativeMethod methods[] = {
11351058 {" jni_YGNodeSetHasMeasureFuncJNI" ,
11361059 " (JZ)V" ,
11371060 (void *)jni_YGNodeSetHasMeasureFuncJNI},
1138- // NOLINTBEGIN(cppcoreguidelines-pro-type-cstyle-cast)
1139- {" jni_YGNodeSetHasMinContentMeasureFuncJNI" ,
1140- " (JZ)V" ,
1141- (void *)jni_YGNodeSetHasMinContentMeasureFuncJNI},
1142- {" jni_YGNodeSetMinContentWidthJNI" ,
1143- " (JF)V" ,
1144- (void *)jni_YGNodeSetMinContentWidthJNI},
1145- {" jni_YGNodeSetMinContentHeightJNI" ,
1146- " (JF)V" ,
1147- (void *)jni_YGNodeSetMinContentHeightJNI},
1148- {" jni_YGNodeGetMinContentWidthJNI" ,
1149- " (J)F" ,
1150- (void *)jni_YGNodeGetMinContentWidthJNI},
1151- {" jni_YGNodeGetMinContentHeightJNI" ,
1152- " (J)F" ,
1153- (void *)jni_YGNodeGetMinContentHeightJNI},
1154- // NOLINTEND(cppcoreguidelines-pro-type-cstyle-cast)
11551061 {" jni_YGNodeStyleGetGapJNI" , " (JI)J" , (void *)jni_YGNodeStyleGetGapJNI},
11561062 {" jni_YGNodeStyleSetGapJNI" , " (JIF)V" , (void *)jni_YGNodeStyleSetGapJNI},
11571063 {" jni_YGNodeStyleSetGapPercentJNI" ,
0 commit comments