add imlib_decache_file() or similar #16
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, imlib2 only provides the "raw" frame of a multi-frame image. This means that the user needs to do the necessary blending. In nsxiv the loading is done in the following way (pseudo-code):
However, this causes problems when we recieve an inotify event but the
mtime
didn't get updated yet. Since we already freed the "raw_frame" (which is what's being cached) we cannot decache it anymore, and trying to load the same file will end up giving stale/old frames. (See https://codeberg.org/nsxiv/nsxiv/issues/456#issuecomment-959168).We can keep the "raw frame" open, but that'd consume unnecessary memory. Another solution is to reload the frames (hoping to get it from the cache) and decache it, and then load it again. But if
mtime
did get updated, then it'd cause unnecessary loading.Ideally, we should be able to do something like
imlib_decache_file(filename);
and have imlib2 invalidate all the cache that's asociated withfilename
.