darktable-org/darktable — pull request #802 by pedrocr (2014-12-30 18:01:03+00:00)
Title: For Comments: cache2 fixed sizes

Now that the thumbnail mip levels are all in the same cache we can have more mip levels spanning more resolutions so as to seamlessly allow switching between 720p/1080p/4K screens. This patch does two things:

* Add more thumbnail mip levels (DT_MIPMAP_4 is enabled and 5 is commented out).
* Set fixed sizes for the levels that try to map to commonly used resolutions

Adding more mip levels is just a matter of adding them to the enum in mipmap_cache.h and the size to the table in mipmap_cache.c.

This is all well and good but since DT_MIPMAP_F is set to the same max size as the largest thumbnail mip (DT_MIPMAP_F-1) this makes the darkroom slower with the current 4K level and crash on my machine on the commented out DT_MIPMAP_5 8K setting. Given that my screen is only 720p it should be possible to have the same performance by not actually using that max size.