| 464 | |
| 465 | |
| 466 | bool ShouldSkipImage(const ImageCache::ImageKey& key) { |
| 467 | if (!skip_cached_images_) |
| 468 | return false; |
| 469 | |
| 470 | // Fetch image cache factory only the first time that we try to load an image |
| 471 | // we don't do it in construction because we are not sure that the cache was |
| 472 | // created since the order of operator creation is not guaranteed. |
| 473 | dali::call_once(fetch_cache_, [this](){ |
| 474 | auto &image_cache_factory = ImageCacheFactory::Instance(); |
| 475 | if (image_cache_factory.IsInitialized(device_id_)) |
| 476 | cache_ = image_cache_factory.Get(device_id_); |
| 477 | }); |
| 478 | return cache_ && cache_->IsCached(key); |
| 479 | } |
| 480 | |
| 481 | // Restores state from snapshot, ignoring its age. |
| 482 | void RestoreEpochState(const LoaderStateSnapshot &state) { |
nothing calls this directly
no test coverage detected