MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / getIdentityResult

Method getIdentityResult

Engine/EffectInstancePrivate.cpp:104–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104bool
105ActionsCache::getIdentityResult(U64 hash,
106 double time,
107 ViewIdx view,
108 int* inputNbIdentity,
109 ViewIdx *inputView,
110 double* identityTime)
111{
112 QMutexLocker l(&_cacheMutex);
113
114 for (std::list<ActionsCacheInstance>::iterator it = _instances.begin(); it != _instances.end(); ++it) {
115 if (it->_hash == hash) {
116 ActionKey key;
117 key.time = time;
118 key.view = view;
119 key.mipMapLevel = 0;
120
121 IdentityCacheMap::const_iterator found = it->_identityCache.find(key);
122 if ( found != it->_identityCache.end() ) {
123 *inputNbIdentity = found->second.inputIdentityNb;
124 *identityTime = found->second.inputIdentityTime;
125 *inputView = found->second.inputView;
126
127 return true;
128 }
129
130 return false;
131 }
132 }
133
134 return false;
135}
136
137void
138ActionsCache::setIdentityResult(U64 hash,

Callers 1

isIdentity_publicMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected