MCPcopy Create free account
hub / github.com/defold/defold / AddDynamicResourceHash

Function AddDynamicResourceHash

engine/gameobject/src/gameobject/gameobject.cpp:306–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304 }
305
306 void AddDynamicResourceHash(HCollection hcollection, dmhash_t resource_hash)
307 {
308 Collection* collection = hcollection->m_Collection;
309 dmMutex::Lock(collection->m_Mutex);
310 if (collection->m_DynamicResources.Remaining() == 0)
311 {
312 collection->m_DynamicResources.OffsetCapacity(1);
313 }
314 collection->m_DynamicResources.Push(resource_hash);
315 dmMutex::Unlock(collection->m_Mutex);
316 }
317
318 void RemoveDynamicResourceHash(HCollection hcollection, dmhash_t resource_hash)
319 {

Callers 5

CreateTextureFunction · 0.85
CreateTextureAsyncFunction · 0.85
CreateAtlasFunction · 0.85
CreateSoundDataFunction · 0.85
CreateBufferFunction · 0.85

Calls 5

LockFunction · 0.50
UnlockFunction · 0.50
RemainingMethod · 0.45
OffsetCapacityMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected