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

Function ComputeDisplays

src/OpenColorIO/Display.cpp:74–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void ComputeDisplays(StringUtils::StringVec & displayCache,
75 const DisplayMap & displays,
76 const StringUtils::StringVec & activeDisplays,
77 const StringUtils::StringVec & activeDisplaysEnvOverride)
78{
79 displayCache.clear();
80
81 StringUtils::StringVec displayMasterList;
82 for(const auto & display : displays)
83 {
84 displayMasterList.push_back(display.first);
85 }
86
87 // Apply the env override if it's not empty.
88 if(!activeDisplaysEnvOverride.empty())
89 {
90 displayCache = IntersectStringVecsCaseIgnore(activeDisplaysEnvOverride, displayMasterList);
91 if(!displayCache.empty()) return;
92 }
93 // Otherwise, apply the active displays if it's not empty.
94 else if(!activeDisplays.empty())
95 {
96 displayCache = IntersectStringVecsCaseIgnore(activeDisplays, displayMasterList);
97 if(!displayCache.empty()) return;
98 }
99
100 displayCache = displayMasterList;
101}
102
103} // namespace OCIO_NAMESPACE

Callers 2

updateDisplayCacheMethod · 0.85
instantiateDisplayMethod · 0.85

Calls 4

clearMethod · 0.45
push_backMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected