allow configuring imlib2's cache size (#171)

by default imlib2 uses a 4mb cache, which is quite small. this allows
users who have more memory to spare to set a bigger cache size and avoid
reloading an already viewed image if it fits into the cache.

Co-authored-by: Berke Kocaoğlu <berke.kocaoglu@metu.edu.tr>
This commit is contained in:
N-R-K
2021-11-26 03:04:02 +06:00
committed by NRK
parent 4396031233
commit 0639047dde
2 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,7 @@ void img_init(img_t *img, win_t *win)
imlib_context_set_display(win->env.dpy);
imlib_context_set_visual(win->env.vis);
imlib_context_set_colormap(win->env.cmap);
imlib_set_cache_size(CACHE_SIZE);
img->im = NULL;
img->win = win;