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

Method addActiveDisplay

src/OpenColorIO/Config.cpp:4158–4179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4156}
4157
4158void Config::addActiveDisplay(const char * display)
4159{
4160 if( !display || !display[0] )
4161 {
4162 throw Exception("Active display could not be added to config, display name was empty");
4163 }
4164
4165 auto it = std::find(getImpl()->m_activeDisplays.begin(),
4166 getImpl()->m_activeDisplays.end(), display);
4167
4168 if( it != getImpl()->m_activeDisplays.end() )
4169 {
4170 // Display is already present.
4171 return;
4172 }
4173
4174 getImpl()->m_activeDisplays.push_back(display);
4175
4176 getImpl()->m_displayCache.clear();
4177 AutoMutex lock(getImpl()->m_cacheidMutex);
4178 getImpl()->resetCacheIDs();
4179}
4180
4181void Config::removeActiveDisplay(const char * display)
4182{

Callers 2

OCIO_ADD_TESTFunction · 0.80

Calls 6

resetCacheIDsMethod · 0.80
getImplFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45

Tested by 2

OCIO_ADD_TESTFunction · 0.64