| 1126 | } |
| 1127 | |
| 1128 | void ValdiAndroid::NativeBridge::setLayoutSpecs( // NOLINT |
| 1129 | fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT |
| 1130 | jlong runtimeHandle, |
| 1131 | jlong contextHandle, |
| 1132 | jint width, |
| 1133 | jint height, |
| 1134 | jboolean isRTL) { |
| 1135 | auto viewNodeTree = getViewNodeTree(contextHandle); |
| 1136 | auto* runtimeWrapper = getRuntimeWrapper(runtimeHandle); |
| 1137 | |
| 1138 | if (viewNodeTree == nullptr || runtimeWrapper == nullptr) { |
| 1139 | return; |
| 1140 | } |
| 1141 | |
| 1142 | auto widthFloat = static_cast<float>(width) / runtimeWrapper->getPointScale(); |
| 1143 | auto heightFloat = static_cast<float>(height) / runtimeWrapper->getPointScale(); |
| 1144 | auto layoutDirection = static_cast<bool>(isRTL) ? Valdi::LayoutDirectionRTL : Valdi::LayoutDirectionLTR; |
| 1145 | |
| 1146 | viewNodeTree->setLayoutSpecs(Valdi::Size(widthFloat, heightFloat), layoutDirection); |
| 1147 | } |
| 1148 | |
| 1149 | void ValdiAndroid::NativeBridge::setVisibleViewport( // NOLINT |
| 1150 | fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT |
nothing calls this directly
no test coverage detected