aboutsummaryrefslogtreecommitdiffstats
path: root/image.c
diff options
context:
space:
mode:
authorN-R-K <79544946+N-R-K@users.noreply.github.com>2021-11-25 22:04:02 +0100
committerNRK <nrk@disroot.org>2021-11-25 22:09:46 +0100
commit0639047dde5d3ccb35f9c1a7be3266a373945b6e (patch)
tree563ad08dfe45535136de5de3d713266e8ea617b1 /image.c
parent43960312333bc9d9a6a8a95fff3563044856eccf (diff)
downloadnsxiv-0639047dde5d3ccb35f9c1a7be3266a373945b6e.tar.zst
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>
Diffstat (limited to 'image.c')
-rw-r--r--image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/image.c b/image.c
index a4183b9..9a47a14 100644
--- a/image.c
+++ b/image.c
@@ -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;