MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / removeVirtualDisplayView

Method removeVirtualDisplayView

src/OpenColorIO/Config.cpp:4063–4093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4061}
4062
4063void Config::removeVirtualDisplayView(const char * view) noexcept
4064{
4065 if (!view) return;
4066
4067 ViewVec::const_iterator iter = FindView(getImpl()->m_virtualDisplay.m_views, view);
4068 if (iter != getImpl()->m_virtualDisplay.m_views.end())
4069 {
4070 ViewVec & views = getImpl()->m_virtualDisplay.m_views;
4071
4072 const auto it = std::find_if(views.begin(), views.end(),
4073 [view](const View & v)
4074 {
4075 return StringUtils::Compare(v.m_name.c_str(), view);
4076 });
4077 if (it!=views.end())
4078 {
4079 views.erase(it);
4080
4081 AutoMutex lock(getImpl()->m_cacheidMutex);
4082 getImpl()->resetCacheIDs();
4083 return;
4084 }
4085 }
4086
4087 if (StringUtils::Remove(getImpl()->m_virtualDisplay.m_sharedViews, view))
4088 {
4089 AutoMutex lock(getImpl()->m_cacheidMutex);
4090 getImpl()->resetCacheIDs();
4091 return;
4092 }
4093}
4094
4095void Config::clearVirtualDisplay() noexcept
4096{

Callers 5

test_virtual_displayMethod · 0.80
OCIO_ADD_TESTFunction · 0.80
OCIO_ADD_TESTFunction · 0.80

Calls 8

FindViewFunction · 0.85
CompareFunction · 0.85
RemoveFunction · 0.85
eraseMethod · 0.80
resetCacheIDsMethod · 0.80
getImplFunction · 0.50
endMethod · 0.45
beginMethod · 0.45

Tested by 5

test_virtual_displayMethod · 0.64
OCIO_ADD_TESTFunction · 0.64
OCIO_ADD_TESTFunction · 0.64