Add an out-of-process custom thumbnailer
For a few reasons we cannot continue using GIO, GnomeDesktopThumbnailFactory and the desktop-wide thumbnail cache. First and foremost, we want the thumbnails to reflect the edited state of the items. Being a non-destructive editor, we never modify the original pixel source. It means the thumbnailer needs to thumbnail the item's source file and the graph of operations that have been applied on top of it. It is not reasonable to expect the generic desktop-wide thumbnailers to be able to handle our GEGL graph. Other non-destructive editors like DarkTable and Shotwell also have their own thumbnailers and caches separate from the desktop's. So, there is prior art in this direction and not an utterly crazy thing to do. As a positive side-effect, we are freed from GIO's reluctance to let an application look for a 'large' high resolution thumbnail without falling back to an inferior version. This thumbnailer runs in a separate process and communicates peer-to-peer over D-Bus to talk to the application. The same process can be used to generate multiple thumbnails and it lingers for a while before terminating. The cache is located at: ~/.cache/gnome-photos/thumbnails/<size>-<generation> Currently, <size> is set to 512 and <generation> is 0. The <generation> tag can be used to forcibly invalidate the thumbnail cache to handle thumbnailer bugs and updates. In future, we should look at sandboxing the thumbnailer to protect it from malicious image data. Note that the thumbnails of certain files, particularly JPEGs exported from Darktable, have strange diagonal distortions and are in monochrome. Needs further investigation. https://bugzilla.gnome.org/show_bug.cgi?id=690255
parent
40d4d312