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

Function PopHints

engine/resource/src/resource_preloader.cpp:372–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370 }
371
372 static bool PopHints(HPreloader preloader)
373 {
374 dmArray<PendingHint> new_hints;
375 {
376 DM_SPINLOCK_SCOPED_LOCK(preloader->m_SyncedDataSpinlock)
377 new_hints.Swap(preloader->m_SyncedData.m_NewHints);
378 }
379
380 uint32_t new_hint_count = 0;
381
382 const uint32_t hint_count = new_hints.Size();
383 const PendingHint* hints = new_hints.Begin();
384 for (uint32_t i = 0; i < hint_count; ++i)
385 {
386 const PendingHint* hint = &hints[i];
387 if (PreloadPathDescriptor(preloader, hint->m_Parent, hint->m_PathDescriptor) == RESULT_OK)
388 {
389 ++new_hint_count;
390 }
391 }
392 return new_hint_count != 0;
393 }
394
395 static Result PreloadHintInternal(HPreloader preloader, TRequestIndex parent, const char* name)
396 {

Callers 2

FinishLoadFunction · 0.85
UpdatePreloaderFunction · 0.85

Calls 4

PreloadPathDescriptorFunction · 0.85
SwapMethod · 0.45
SizeMethod · 0.45
BeginMethod · 0.45

Tested by

no test coverage detected