MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / ManageGPUThumbnails

Method ManageGPUThumbnails

ImGuiFileDialog.cpp:3102–3134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3100}
3101
3102void IGFD::ThumbnailFeature::ManageGPUThumbnails() {
3103 if (m_CreateThumbnailFun) {
3104 m_ThumbnailToCreateMutex.lock();
3105 if (!m_ThumbnailToCreate.empty()) {
3106 for (const auto& file : m_ThumbnailToCreate) {
3107 if (file.use_count()) {
3108 m_CreateThumbnailFun(&file->thumbnailInfo);
3109 }
3110 }
3111 m_ThumbnailToCreate.clear();
3112 }
3113 m_ThumbnailToCreateMutex.unlock();
3114 } else {
3115 printf(
3116 "No Callback found for create texture\nYou need to define the callback with a call to "
3117 "SetCreateThumbnailCallback\n");
3118 }
3119
3120 if (m_DestroyThumbnailFun) {
3121 m_ThumbnailToDestroyMutex.lock();
3122 if (!m_ThumbnailToDestroy.empty()) {
3123 for (auto thumbnail : m_ThumbnailToDestroy) {
3124 m_DestroyThumbnailFun(&thumbnail);
3125 }
3126 m_ThumbnailToDestroy.clear();
3127 }
3128 m_ThumbnailToDestroyMutex.unlock();
3129 } else {
3130 printf(
3131 "No Callback found for destroy texture\nYou need to define the callback with a call to "
3132 "SetCreateThumbnailCallback\n");
3133 }
3134}
3135
3136#endif // USE_THUMBNAILS
3137

Callers 1

ManageGPUThumbnailsFunction · 0.80

Calls 2

emptyMethod · 0.80
clearMethod · 0.80

Tested by

no test coverage detected