| 262 | } |
| 263 | |
| 264 | bool |
| 265 | ActionsCache::getFramesNeededResult(U64 hash, |
| 266 | double time, |
| 267 | ViewIdx view, |
| 268 | unsigned int mipMapLevel, |
| 269 | FramesNeededMap* framesNeeded) |
| 270 | { |
| 271 | QMutexLocker l(&_cacheMutex); |
| 272 | |
| 273 | for (std::list<ActionsCacheInstance>::iterator it = _instances.begin(); it != _instances.end(); ++it) { |
| 274 | if (it->_hash == hash) { |
| 275 | ActionKey key; |
| 276 | key.time = time; |
| 277 | key.view = view; |
| 278 | key.mipMapLevel = mipMapLevel; |
| 279 | |
| 280 | FramesNeededCacheMap::const_iterator found = it->_framesNeededCache.find(key); |
| 281 | if ( found != it->_framesNeededCache.end() ) { |
| 282 | *framesNeeded = found->second; |
| 283 | |
| 284 | return true; |
| 285 | } |
| 286 | |
| 287 | return false; |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | return false; |
| 292 | } |
| 293 | |
| 294 | void |
| 295 | ActionsCache::setFramesNeededResult(U64 hash, |
no test coverage detected