| 102 | } |
| 103 | |
| 104 | bool |
| 105 | ActionsCache::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 | |
| 137 | void |
| 138 | ActionsCache::setIdentityResult(U64 hash, |
no test coverage detected