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

Method beginViewTransaction

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

Source from the content-addressed store, hash-verified

928}
929
930Ref<ViewTransactionScope> ViewNodeTree::beginViewTransaction() {
931 _beginViewTransactionCounter++;
932
933 auto viewTransactionScope = _currentViewTransactionScope;
934 if (viewTransactionScope == nullptr) {
935 viewTransactionScope =
936 makeShared<ViewTransactionScope>(_viewManager, _mainThreadManager, _shouldRenderInMainThread);
937 _currentViewTransactionScope = viewTransactionScope;
938 }
939
940 if (_beginViewTransactionCounter == 1) {
941 viewTransactionScope->setRootView(getRootView());
942 }
943
944 return viewTransactionScope;
945}
946
947void ViewNodeTree::endViewTransaction(const Ref<ViewTransactionScope>& viewTransactionScope,
948 bool layoutDidBecomeDirty) {

Callers

nothing calls this directly

Calls 2

getRootViewFunction · 0.85
setRootViewMethod · 0.45

Tested by

no test coverage detected