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

Function getSrcAssetFromNode

valdi/test/integration/Runtime_tests.cpp:4918–4925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4916};
4917
4918Ref<Asset> getSrcAssetFromNode(ViewNode& viewNode) {
4919 auto assetHandler = castOrNull<ViewNodeAssetHandler>(viewNode.getAssetHandler());
4920 if (assetHandler == nullptr) {
4921 return nullptr;
4922 }
4923
4924 return assetHandler->getAsset();
4925}
4926
4927Ref<Asset> getSrcAsset(const Ref<ViewNodeTree>& tree) {
4928 return getSrcAssetFromNode(*getViewNodeForId(tree, "imageView"));

Callers 2

getSrcAssetFunction · 0.85
TEST_PFunction · 0.85

Calls 1

getAssetMethod · 0.45

Tested by

no test coverage detected