Clean up clutstore.* and add LRU cache

This commit adds a true LRU cache to `rtengine` which is used in the new
`CLUTStore` class. The code in `clutstore.*` was cleaned up with C++11
features and small optimizations taken from my `clutbench` project.
The `CLUTStore` class was converted to a true singleton.
This commit is contained in:
Flössie
2016-04-16 22:20:18 +02:00
parent e61e488346
commit e495093b18
6 changed files with 476 additions and 472 deletions

View File

@@ -857,7 +857,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
// if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS)
if ( params.filmSimulation.enabled && !params.filmSimulation.clutFilename.empty() && options.clutCacheSize == 1) {
clutStore.clearCache();
CLUTStore::getInstance().clearCache();
}
// freeing up some memory