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

Method getCurrentContext

valdi/src/valdi/android/NativeBridge.cpp:1602–1611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1600 auto& viewTransactionScope = viewNodeTree->getCurrentViewTransactionScope();
1601 if (static_cast<bool>(hasOpacity)) {
1602 viewNode->setAttribute(viewTransactionScope, opacityId, attributeOwner, Valdi::Value(opacity), nullptr);
1603 } else {
1604 viewNode->setAttribute(viewTransactionScope, opacityId, attributeOwner, Valdi::Value::undefined(), nullptr);
1605 }
1606
1607 if (static_cast<bool>(hasTransform)) {
1608 viewNode->setAttribute(
1609 viewTransactionScope, translationYId, attributeOwner, Valdi::Value(translationY), nullptr);
1610 viewNode->setAttribute(viewTransactionScope, scaleXId, attributeOwner, Valdi::Value(scale), nullptr);
1611 viewNode->setAttribute(viewTransactionScope, scaleYId, attributeOwner, Valdi::Value(scale), nullptr);
1612 } else {
1613 viewNode->setAttribute(
1614 viewTransactionScope, translationYId, attributeOwner, Valdi::Value::undefined(), nullptr);

Callers

nothing calls this directly

Calls 3

fromValdiContextUserDataFunction · 0.85
getUserDataMethod · 0.80
releaseObjectMethod · 0.65

Tested by

no test coverage detected