| 220 | } |
| 221 | |
| 222 | void PreviewsCache::Flush() |
| 223 | { |
| 224 | ScopeLock lock(Locker); |
| 225 | |
| 226 | // Check if is fully loaded and is dirty and is not during downloading |
| 227 | if (_isDirty && !IsFlushing() && IsReady()) |
| 228 | { |
| 229 | // Spawn flushing tasks sequence |
| 230 | _flushTask = New<FlushTask>(this); |
| 231 | auto downloadDataTask = GetTexture()->DownloadDataAsync(_flushTask->GetData()); |
| 232 | downloadDataTask->ContinueWith(_flushTask); |
| 233 | downloadDataTask->Start(); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | #if COMPILE_WITH_ASSETS_IMPORTER |
| 238 |
nothing calls this directly
no test coverage detected