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

Method setLayoutSpecs

valdi/src/valdi/runtime/Context/ViewNodeTree.cpp:311–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311void ViewNodeTree::setLayoutSpecs(Size layoutSize, LayoutDirection layoutDirection) {
312 auto lockGuard = lock();
313 _hasLayoutSpecs = true;
314 _layoutSpecsDirty = false;
315
316 if (_layoutSize != layoutSize) {
317 _layoutSize = layoutSize;
318 _layoutDirty = true;
319 }
320
321 if (_layoutDirection != layoutDirection) {
322 _layoutDirection = layoutDirection;
323 _layoutDirty = true;
324 }
325
326#if VALDI_DEBUG_TREE_UPDATES
327 scheduleExclusiveUpdate([this]() { this->performUpdates(); }, DispatchFunction(), "setLayoutSpecs");
328#else
329 scheduleExclusiveUpdate([this]() { this->performUpdates(); }, DispatchFunction());
330#endif
331}
332
333void ViewNodeTree::setViewport(std::optional<Frame> viewport) {
334 auto lockGuard = lock();

Callers

nothing calls this directly

Calls 2

performUpdatesMethod · 0.95
DispatchFunctionClass · 0.85

Tested by

no test coverage detected