diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-09-25 20:57:24 +0200 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-09-26 10:31:03 +0200 |
commit | eaa269b6cb486f83229cb0d3dc5f7e03d1c485bb (patch) | |
tree | 747866d0326009a8e2ab52467d69dc1af101eb06 /thumbs.h | |
parent | 52e56c892460e7d1f63ca557b705812f08d6d20c (diff) |
Revised thumbnail loading...
- Only load the thumbnails that are currently visible in the window
- Unload thumbnails that are leaving the visible area
- Much less memory needed, but scrolling is now slower
- This also unintentionally fixes issue #86
Diffstat (limited to 'thumbs.h')
-rw-r--r-- | thumbs.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -31,16 +31,15 @@ typedef struct { int h; int x; int y; - bool loaded; } thumb_t; typedef struct { const fileinfo_t *files; thumb_t *thumbs; - int cap; int cnt; int loadnext; - int first; + int first, end; + int r_first, r_end; int *sel; win_t *win; @@ -58,6 +57,7 @@ void tns_init(tns_t*, const fileinfo_t*, int, int*, win_t*); void tns_free(tns_t*); bool tns_load(tns_t*, int, bool); +void tns_unload(tns_t*, int); void tns_render(tns_t*); void tns_mark(tns_t*, int, bool); |