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

Method createObservable

valdi/src/valdi/runtime/Resources/AssetsManager.cpp:186–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186Shared<ObservableAsset> AssetsManager::createObservable(const AssetKey& assetKey) {
187 auto asset = makeShared<ObservableAsset>(assetKey, weakRef(this));
188 if (!assetKey.isURL()) {
189 auto assetCatalog = getAssetCatalogForBundle(assetKey.getBundle());
190 updateObservableAssetSize(asset, assetKey.getPath(), assetCatalog);
191 }
192
193 return asset.toShared();
194}
195
196void AssetsManager::addAssetLoadObserver(const AssetKey& assetKey,
197 const Shared<snap::valdi_core::AssetLoadObserver>& observer,

Callers

nothing calls this directly

Calls 7

weakRefFunction · 0.85
getAssetCatalogForBundleFunction · 0.85
getBundleMethod · 0.80
toSharedMethod · 0.80
isURLMethod · 0.45
getPathMethod · 0.45

Tested by

no test coverage detected