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

Method didUpdateRootView

valdi/src/valdi/android/AndroidViewTransaction.cpp:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void AndroidViewTransaction::didUpdateRootView(const Valdi::Ref<Valdi::View>& view, bool layoutDidBecomeDirty) {
44 getViewOperations().enqueueEndRenderingView(view, layoutDidBecomeDirty);
45
46 for (const auto& pendingCallback : _pendingOnNextDrawCallbacks) {
47 auto callbackRootView = pendingCallback.rootView != nullptr ? pendingCallback.rootView : view;
48 if (callbackRootView == nullptr) {
49 delete reinterpret_cast<Valdi::DispatchFunction*>(pendingCallback.callbackHandle);
50 continue;
51 }
52
53 getViewOperations().enqueueOnNextDraw(callbackRootView, pendingCallback.callbackHandle);
54 }
55
56 _pendingOnNextDrawCallbacks.clear();
57}
58
59void AndroidViewTransaction::moveViewToTree(const Valdi::Ref<Valdi::View>& view,
60 Valdi::ViewNodeTree* viewNodeTree,

Callers 1

TEST_PFunction · 0.45

Calls 3

enqueueOnNextDrawMethod · 0.80
clearMethod · 0.65

Tested by 1

TEST_PFunction · 0.36