| 1176 | return Valdi::pointsToPackedPixels(measuredSize.width, measuredSize.height, pointScale); |
| 1177 | } |
| 1178 | |
| 1179 | void ValdiAndroid::NativeBridge::setLayoutSpecs( // NOLINT |
| 1180 | fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT |
| 1181 | jlong runtimeHandle, |
| 1182 | jlong contextHandle, |
| 1183 | jint width, |
| 1184 | jint height, |
| 1185 | jboolean isRTL) { |
| 1186 | auto viewNodeTree = getViewNodeTree(contextHandle); |
| 1187 | auto* runtimeWrapper = getRuntimeWrapper(runtimeHandle); |
| 1188 | |
| 1189 | if (viewNodeTree == nullptr || runtimeWrapper == nullptr) { |
| 1190 | return; |
| 1191 | } |
| 1192 | |
| 1193 | auto widthFloat = static_cast<float>(width) / runtimeWrapper->getPointScale(); |
| 1194 | auto heightFloat = static_cast<float>(height) / runtimeWrapper->getPointScale(); |
| 1195 | auto layoutDirection = static_cast<bool>(isRTL) ? Valdi::LayoutDirectionRTL : Valdi::LayoutDirectionLTR; |
| 1196 | |
| 1197 | viewNodeTree->setLayoutSpecs(Valdi::Size(widthFloat, heightFloat), layoutDirection); |
| 1198 | } |
| 1199 |
nothing calls this directly
no test coverage detected