From 0639047dde5d3ccb35f9c1a7be3266a373945b6e Mon Sep 17 00:00:00 2001 From: N-R-K <79544946+N-R-K@users.noreply.github.com> Date: Fri, 26 Nov 2021 03:04:02 +0600 Subject: allow configuring imlib2's cache size (#171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'image.c') 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; -- cgit v1.2.3