MCPcopy Create free account
hub / github.com/Snapchat/Valdi / layoutFinished

Method layoutFinished

valdi/src/valdi/runtime/Context/ViewNode.cpp:2333–2359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2331 }
2332
2333 _flags[kHasLazyLayoutNeedingCalculationFlag] = true;
2334
2335 auto parent = getParent();
2336 if (parent != nullptr) {
2337 parent->scheduleLazyLayout();
2338 } else {
2339 scheduleUpdates();
2340 }
2341}
2342
2343struct MeasureMetrics {
2344 uint32_t totalMeasure = 0;
2345};
2346
2347static thread_local MeasureMetrics* currentMeasureMetrics = nullptr;
2348
2349facebook::yoga::StyleSizeLength resolveYogaValue(float containerSize, facebook::yoga::StyleSizeLength appliedValue) {
2350 float resolvedValue;
2351
2352 if (appliedValue.isPoints()) {
2353 resolvedValue = std::min(appliedValue.value().unwrap(), containerSize);
2354 } else if (appliedValue.isPercent()) {
2355 resolvedValue = appliedValue.value().unwrap() * containerSize * 0.01f;
2356 } else {
2357 resolvedValue = containerSize;
2358 }
2359
2360 return facebook::yoga::StyleSizeLength::points(resolvedValue);
2361}
2362

Callers

nothing calls this directly

Calls 10

getRtlScrollOffsetXMethod · 0.80
setInScrollModeMethod · 0.80
getRtlOffsetXMethod · 0.80
getMethod · 0.65
flushMethod · 0.65
setHorizontalMethod · 0.45
setNeedsUpdateMethod · 0.45
onFrameChangedMethod · 0.45

Tested by

no test coverage detected