| 23 | } |
| 24 | |
| 25 | Vec2U ImageMetadataDatabase::imageSize(AssetPath const& path) const { |
| 26 | MutexLocker locker(m_mutex); |
| 27 | if (auto cached = m_sizeCache.ptr(path)) |
| 28 | return *cached; |
| 29 | |
| 30 | locker.unlock(); |
| 31 | Vec2U size = calculateImageSize(path); |
| 32 | |
| 33 | locker.lock(); |
| 34 | m_sizeCache.set(path, size); |
| 35 | return size; |
| 36 | } |
| 37 | |
| 38 | List<Vec2I> ImageMetadataDatabase::imageSpaces(AssetPath const& path, Vec2F position, float fillLimit, bool flip) const { |
| 39 | SpacesEntry key = make_tuple(path, Vec2I::round(position), fillLimit, flip); |
no test coverage detected