| 1126 | auto pointScale = runtimeWrapper->getPointScale(); |
| 1127 | |
| 1128 | auto resolvedWidthMode = static_cast<Valdi::MeasureMode>(widthMode); |
| 1129 | auto resolvedHeightMode = static_cast<Valdi::MeasureMode>(heightMode); |
| 1130 | auto maxWidthFloat = static_cast<float>(maxWidth) / pointScale; |
| 1131 | auto maxHeightFloat = static_cast<float>(maxHeight) / pointScale; |
| 1132 | |
| 1133 | auto layoutDirection = static_cast<bool>(isRTL) ? Valdi::LayoutDirectionRTL : Valdi::LayoutDirectionLTR; |
| 1134 | |
| 1135 | auto lock = viewNodeTree->lock(); |
| 1136 | auto measuredSize = viewNodeTree->measureLayout( |
| 1137 | maxWidthFloat, resolvedWidthMode, maxHeightFloat, resolvedHeightMode, layoutDirection); |
| 1138 | |
| 1139 | return Valdi::pointsToPackedPixels(measuredSize.width, measuredSize.height, pointScale); |
| 1140 | } |
| 1141 | |
| 1142 | void ValdiAndroid::NativeBridge::setLayoutSpecs( // NOLINT |
| 1143 | fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT |
| 1144 | jlong runtimeHandle, |
| 1145 | jlong contextHandle, |
| 1146 | jint width, |
| 1147 | jint height, |
| 1148 | jboolean isRTL) { |
| 1149 | auto viewNodeTree = getViewNodeTree(contextHandle); |
| 1150 | auto* runtimeWrapper = getRuntimeWrapper(runtimeHandle); |
nothing calls this directly
no test coverage detected